/* The Report tab.
 *
 * Reuses the analysis workspace shell — section index, flow, cards — so the
 * two long-form tabs read as one family. What is new here is the furniture the
 * report needs and the analysis does not: the evidence-class tag on every
 * paragraph, the grade block, and the dossier card.
 */

.report-workspace .analysis-flow {
  gap: var(--space-6);
}

/* -------------------------------------------------------------- the lede
 *
 * The analysis lede is a two-column grid: headline left, verdict right. The
 * report lede is one vertical editorial block rather than a split grid.
 */

.report-workspace .analysis-lede {
  display: block;
}

.report-workspace .analysis-lede h2 {
  max-width: 22ch;
}

.report-workspace .analysis-verdict {
  margin-top: var(--space-4);
  max-width: 68ch;
}

/* --------------------------------------------------- the evidence classes
 *
 * Not shown. Each paragraph still carries its class as data-basis, and the
 * verifier still enforces it, but the reader gets prose rather than a chip in
 * front of every sentence: labelling all of them Observed / Model / Reading
 * made a tactical report read as a classified dataset.
 */

/* ------------------------------------------------------------- the tables */

.report-absent,
.report-conflicts,
.report-limits {
  margin-top: var(--space-4);
  padding: var(--space-4);
  border-radius: var(--radius-control);
  background: var(--surface-sunken);
  border-left: 3px solid var(--border-strong);
}

.report-conflicts { border-left-color: var(--warning-text); }
.report-absent { border-left-color: var(--text-muted); }

.report-absent strong,
.report-conflicts strong,
.report-limits strong {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 0.875rem;
}

.report-absent ul,
.report-conflicts ul,
.report-limits ul {
  margin: 0;
  padding-left: var(--space-5);
  color: var(--text-secondary);
  font-size: 0.875rem;
  line-height: 1.55;
}

.report-scores {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3);
  margin: var(--space-4) 0;
}

.report-scores article {
  background: var(--surface-sunken);
  border-radius: var(--radius-control);
  padding: var(--space-4);
  text-align: center;
}

.report-scores span {
  display: block;
  color: var(--text-muted);
  font-size: 0.75rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.report-scores strong {
  display: block;
  font-family: var(--font-figure);
  font-size: 2rem;
  line-height: 1.1;
  margin-top: var(--space-1);
}

/* ------------------------------------------------------------- dossiers */

.report-players {
  margin-top: var(--space-8);
}

.report-grade-note {
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.55;
  max-width: 78ch;
  margin: var(--space-2) 0 var(--space-4);
}

.dossier-list {
  display: grid;
  gap: var(--space-4);
}

.dossier-head {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  flex-wrap: wrap;
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--border-subtle);
}

.dossier-identity {
  flex: 1 1 12rem;
  min-width: 0;
}

.dossier-identity strong {
  display: block;
  font-size: 1.0625rem;
  line-height: 1.3;
}

.dossier-identity small {
  color: var(--text-muted);
  font-size: 0.8125rem;
}

/* The grade and the two provider ratings sit side by side and are sized
   differently on purpose: this project's own figure is the one it stands
   behind, and the neighbours are there so the reader can disagree with it. */
.grade-block {
  text-align: center;
  min-width: 5.5rem;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-control);
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
}

.grade-block strong {
  display: block;
  font-family: var(--font-figure);
  font-size: 1.75rem;
  line-height: 1.05;
}

.grade-block small {
  display: block;
  color: var(--text-muted);
  font-size: 0.6875rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.grade-block em {
  display: block;
  margin-top: var(--space-1);
  font-style: normal;
  font-size: 0.6875rem;
  color: var(--warning-text);
  cursor: help;
}

.grade-high strong { color: var(--success-text); }
.grade-low strong { color: var(--danger-text); }
.grade-block.withheld strong { color: var(--text-muted); font-size: 1.5rem; }

.provider-ratings {
  display: flex;
  gap: var(--space-3);
  cursor: help;
}

.provider-ratings span {
  text-align: center;
}

.provider-ratings small {
  display: block;
  color: var(--text-muted);
  font-size: 0.6875rem;
}

.provider-ratings b {
  font-family: var(--font-figure);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-secondary);
}

.dossier-prose p {
  margin: var(--space-3) 0 0;
  line-height: 1.6;
  color: var(--text-secondary);
}

.dossier-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: var(--space-3);
}

.dossier-tags .tag {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  padding: 2px var(--space-3);
  border-radius: var(--radius-round);
  font-size: 0.8125rem;
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  cursor: help;
}

.dossier-tags .tag-up { border-color: var(--success-text); color: var(--success-text); }
.dossier-tags .tag-down { border-color: var(--danger-text); color: var(--danger-text); }

/* The repeatability sits inside the tag rather than beside it: a finding and
   how much of it survives to next week are one statement, not two. */
.dossier-tags .tag i {
  font-style: normal;
  font-size: 0.6875rem;
  color: var(--text-muted);
  letter-spacing: 0.03em;
}

.dossier-verdict {
  margin: var(--space-4) 0 0;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-sunken);
  border-left: 3px solid var(--brand-accent);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  line-height: 1.55;
}

.dossier-verdict span {
  display: block;
  color: var(--text-muted);
  font-size: 0.6875rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: var(--space-1);
}

.dossier .derivation {
  margin-top: var(--space-4);
}

.dossier .derivation .positive { color: var(--success-text); }
.dossier .derivation .negative { color: var(--danger-text); }

.derivation-note {
  margin: var(--space-3) 0 0;
  color: var(--text-muted);
  font-size: 0.8125rem;
  line-height: 1.55;
}

@media (max-width: 640px) {
  .dossier-head {
    align-items: flex-start;
  }

  .grade-block {
    min-width: 4.5rem;
  }

  .grade-block strong {
    font-size: 1.5rem;
  }
}

/* ------------------------------------------------------------------ pitch
 *
 * Diagrams arrive from the report as coordinates and are drawn in the browser,
 * so they take their colours from the same tokens as the prose and work in
 * both themes without a second asset.
 */

.section-lead {
  font-size: 1.08rem;
  line-height: 1.55;
  color: var(--text-primary);
  margin: 0 0 var(--space-4);
  padding-left: var(--space-4);
  border-left: 3px solid var(--brand-accent);
}

/* Centred in the card with the caption beneath it, both held to the diagram's
   own width so the two read as one object rather than as a picture with a
   stray line of text beside it. */
.pitch-figure {
  margin: var(--space-5) auto;
  display: grid;
  gap: var(--space-3);
  grid-template-columns: minmax(0, 940px);
  justify-content: center;
  align-items: start;
}
/* The diagram is drawn for a pitch about 760 units wide and its labels are
   sized for that. Left to fill a wide card it scales past its design size, the
   pitch swallows the viewport and the reader loses the prose around it — so it
   is capped near natural scale and shrinks only on narrow screens. */
.pitch-svg {
  width: 100%; max-width: 940px; height: auto; display: block;
  background: var(--pitch-surface);
  border-radius: var(--radius-control);
}
.pitch-figure figcaption {
  margin-top: var(--space-3);
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  align-items: baseline;
}
.pitch-figure figcaption small { color: var(--text-muted); font-variant: small-caps; letter-spacing: 0.03em; }

/* The pitch itself is pitchMarkup and styles.css .pitch-lines, exactly as the
   heatmap, shot and on-ball maps draw it. Only the marks on top belong here.
   Everything is in metres because the viewBox is 105x68. */

.pitch-svg { width: 100%; max-width: 940px; height: auto; display: block; }

/* Mixed rather than laid over at low opacity: on the green ground a flat
   translucent accent reads as a shadow instead of a marked band. */
.pitch-zone { fill: color-mix(in srgb, var(--brand-accent) 22%, transparent); }
.pitch-zone-label { fill: var(--text-on-accent); font-size: 1.8px; font-weight: 700; opacity: 0.75; }
.pitch-cell { fill: color-mix(in srgb, var(--brand-accent) 85%, transparent); }
.pitch-cell-value { fill: var(--text-primary); font-size: 2.2px; font-weight: 650; }
.pitch-cell-label {
  fill: var(--text-primary); font-size: 1.7px; font-weight: 600; opacity: 0.85;
  paint-order: stroke; stroke: var(--surface-base); stroke-width: 0.5px;
}
/* The opponent's defensive work is drawn on the same pitch as our own route, so
   it has to be a different colour and not merely a different opacity: two
   shades of the club accent read as one quantity in two strengths. */
.pitch-cell-opponent { fill: color-mix(in srgb, var(--danger-text, #b3261e) 78%, transparent); }

/* Board annotations name a space rather than a player, so they are set apart
   from the badge lettering: lighter weight, small caps, no keyline. */
.pitch-annotation {
  fill: var(--text-primary); font-size: 2.1px; font-weight: 700;
  font-variant: small-caps; letter-spacing: 0.04em;
  paint-order: stroke; stroke: var(--surface-base); stroke-width: 0.7px;
}
.pitch-annotation.is-absent { fill: var(--danger-text, #b3261e); }
.pitch-annotation.is-muted { fill: var(--text-muted); }

/* The badge is the one the shape map uses in Positions & Heatmaps: club colour
   fill, white keyline, number inside, name beneath. Restated against the same
   tokens rather than invented, so the two maps read as one product. */
.pitch-position { --shape-colour: var(--brand-accent); }
.pitch-position circle {
  fill: var(--shape-colour);
  stroke: var(--text-on-accent);
  stroke-width: 1.5px;
  vector-effect: non-scaling-stroke;
}
.pitch-position text {
  fill: var(--text-on-accent);
  text-anchor: middle;
  paint-order: stroke;
  stroke: var(--surface-base);
  stroke-width: 0.65px;
}
.pitch-position .shirt { font-size: 2.3px; font-weight: 900; }
.pitch-position .name { font-size: 2.3px; font-weight: 800; }
.pitch-position.is-exit { --shape-colour: var(--info-text); }
/* The other team, on a map that carries both. Hollow rather than filled, so the
   eye reads our own marks first and the opposition as the furniture they are. */
.pitch-position.is-opponent { --shape-colour: transparent; }
.pitch-position.is-opponent circle {
  stroke: var(--text-on-accent); stroke-width: 1.2px; stroke-dasharray: 2 1.4;
}
.pitch-position.is-opponent .name { font-weight: 650; opacity: 0.9; }
.pitch-position.is-clickable { cursor: pointer; }
.pitch-position:focus-visible { outline: 2px solid var(--focus-ring, var(--brand-accent)); outline-offset: 2px; }
.pitch-position.is-selected circle { stroke-width: 2.4px; }
.pitch-position.is-selected .name, .pitch-position.is-selected .shirt { font-weight: 900; }

.pitch-node { fill: var(--shape-colour, var(--brand-accent)); }
.pitch-node-goal { fill: var(--brand-accent); }
.pitch-ring { fill: none; stroke: var(--success-text); stroke-width: 0.32; }

.pitch-label {
  fill: var(--text-on-accent); font-size: 2.3px; font-weight: 800;
  text-anchor: middle; paint-order: stroke;
  stroke: var(--surface-base); stroke-width: 0.65px;
}
.pitch-step {
  text-anchor: middle;
  fill: var(--text-on-accent); font-size: 2.3px; font-weight: 900;
  text-anchor: middle; paint-order: stroke;
  stroke: var(--surface-base); stroke-width: 0.65px;
}

.pitch-edge { fill: none; }
.pitch-edge-prog, .pitch-edge-seq { stroke: var(--brand-accent); opacity: 0.9; }
.pitch-edge-circ { stroke: var(--border-strong); opacity: 0.85; }
.pitch-edge-exit { stroke: var(--info-text); opacity: 0.85; }
.pitch-arrow { stroke: none; }
.pitch-arrow-prog, .pitch-arrow-seq { fill: var(--brand-accent); }
.pitch-arrow-circ { fill: var(--border-strong); }
.pitch-arrow-exit { fill: var(--info-text); }

.report-sequences { display: flex; flex-direction: column; gap: var(--space-2); margin: var(--space-4) 0 0; }
.sequence {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2);
  padding: var(--space-2) var(--space-3);
  background: var(--surface-sunken); border: 1px solid var(--border-subtle); border-radius: var(--radius-control);
}
.sequence-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); }
.sequence-chain { font-family: var(--font-figure); font-size: 0.875rem; color: var(--text-primary); }
.sequence small { color: var(--text-muted); font-size: 0.75rem; }

/* A named mechanism inside a section. The letter is the filing label the prose
   refers to, and it sits in the margin so the heading itself stays a heading
   rather than becoming "A — The release". */
.mechanism-head {
  display: flex; align-items: baseline; gap: var(--space-3);
  margin: var(--space-6) 0 var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}
.mechanism-head:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.mechanism-head h4 {
  margin: 0; font-size: 1.0625rem; line-height: 1.3; color: var(--text-primary);
}
.mechanism-letter {
  flex: none; display: grid; place-items: center;
  inline-size: 1.5rem; block-size: 1.5rem;
  border-radius: 50%; background: var(--brand-accent); color: var(--text-on-accent);
  font-size: 0.75rem; font-weight: 800; font-variant-numeric: tabular-nums;
}

/* Blocks alternate prose and pitches, so the prose runs need their own rhythm:
   without this every paragraph is its own .analysis-prose and the gaps double
   wherever two happen to sit together. */
.analysis-section > .analysis-prose + .analysis-prose { margin-top: var(--space-3); }
.analysis-section > .pitch-figure + .analysis-prose,
.analysis-section > .report-sequences + .analysis-prose { margin-top: var(--space-4); }

.report-appendix { margin: var(--space-6) 0 0; border-top: 1px solid var(--border-subtle); padding-top: var(--space-4); }
.report-appendix > summary { cursor: pointer; display: flex; align-items: baseline; gap: var(--space-3); }
.report-appendix > summary h3 { display: inline; margin: 0; }
.report-appendix > summary small { color: var(--text-muted); }
.report-appendix[open] > summary { margin-bottom: var(--space-4); }


/* ------------------------------------------------- drilling into a node
 *
 * The maps above are averages. One click puts the touches behind an average on
 * the pitch, because the first honest question about a mean reception position
 * is "made of what?".
 */

.pitch-hit { fill: transparent; stroke: none; cursor: pointer; }
/* Chrome paints its own ring on a focused SVG shape; suppress it and draw the
   focus state as a stroke so it follows the circle rather than boxing it. */
.pitch-hit:focus { outline: none; }
/* An outline on a circle draws a square. Stroke the hit area instead so the
   keyboard focus ring matches the shape it is focusing. */
.pitch-hit:focus-visible {
  outline: none;
  stroke: var(--brand-accent);
  stroke-width: 0.3;
}
.pitch-node.is-clickable { cursor: pointer; }
.pitch-node.is-selected { fill: var(--brand-accent); }

/* Everything not selected steps back rather than disappearing: the reader
   still needs the shape around the player they are inspecting. */
.pitch-svg.has-selection .pitch-edge,
.pitch-svg.has-selection .pitch-position:not(.is-selected) { opacity: 0.28; }

.pitch-touch-pass {
  stroke: var(--info-text);
  stroke-width: 0.22;
  fill: none;
  opacity: 0.55;
}
.pitch-touch-pass.is-progressive { stroke: var(--brand-accent); opacity: 0.9; stroke-width: 0.3; }
.pitch-touch-reception { fill: var(--success-text); opacity: 0.85; }

.pitch-hint {
  color: var(--text-muted);
  font-size: 0.75rem;
  font-variant: normal;
  letter-spacing: 0;
}

/* ------------------------------------------------- the click and the text
 *
 * A map that only scatters dots is a toy beside the argument. Clicking a
 * player says what this section says about him, and lights his name where the
 * prose makes the claim, so the picture and the paragraph are one thing.
 */

.pitch-readout {
  margin: var(--space-3) 0 0;
  padding: var(--space-3) var(--space-4);
  background: var(--surface-sunken);
  border-left: 3px solid var(--brand-accent);
  border-radius: 0 var(--radius-control) var(--radius-control) 0;
  font-size: 0.9375rem;
  line-height: 1.55;
  color: var(--text-secondary);
  max-width: 940px;
}

.player-mention { border-radius: 2px; transition: background-color 120ms ease; }
.player-mention.is-active {
  background: color-mix(in srgb, var(--brand-accent) 26%, transparent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-accent) 26%, transparent);
  color: var(--text-primary);
  font-weight: 650;
}
@media (prefers-reduced-motion: reduce) { .player-mention { transition: none; } }

/* Shots, and one player's carries. */
.pitch-shot {
  fill: color-mix(in srgb, var(--brand-accent) 28%, transparent);
  stroke: var(--brand-accent);
  stroke-width: 1.2px;
  vector-effect: non-scaling-stroke;
}
.pitch-shot.is-on-target { fill: color-mix(in srgb, var(--brand-accent) 50%, transparent); }
.pitch-shot.is-goal {
  fill: var(--brand-accent);
  stroke: var(--text-on-accent);
  stroke-width: 1.6px;
}
.pitch-touch-carry {
  stroke: var(--success-text);
  stroke-width: 0.26;
  stroke-dasharray: 1.1 0.7;
  fill: none;
  opacity: 0.75;
}
.pitch-touch-carry.is-progressive { stroke-width: 0.36; opacity: 1; }

/* ========================================================================== *
 * Tactical report presentation pass — top half
 *
 * This layer does not alter the report payload or its conclusions. It gives
 * the existing model, structure, mechanisms and sequence examples a stable
 * editorial hierarchy, while the lower half keeps the established renderer
 * until this system has been reviewed.
 * ========================================================================== */

.report-workspace {
  --report-reading: 74ch;
}

.report-workspace .analysis-flow {
  gap: clamp(18px, 2vw, 30px);
}

.report-workspace .analysis-section {
  padding-inline: clamp(22px, 2.4vw, 34px);
}

.report-workspace .analysis-prose {
  max-width: var(--report-reading);
  columns: 1;
  column-rule: 0;
}

.report-workspace .analysis-section > .panel-title {
  margin-bottom: clamp(18px, 2.4vw, 30px);
  padding-bottom: 16px;
  border-bottom-color: var(--border-strong);
}

.report-workspace .analysis-section > .panel-title h3 {
  font-size: clamp(22px, 2.1vw, 32px);
  letter-spacing: -0.025em;
}

.report-workspace .section-lead {
  max-width: 62ch;
  margin: 0;
  padding: 0;
  border: 0;
  color: var(--text-primary);
  font-size: clamp(20px, 1.75vw, 26px);
  font-weight: 760;
  line-height: 1.32;
  text-wrap: balance;
}

.report-workspace .section-context {
  max-width: var(--report-reading);
  margin: var(--space-4) 0 clamp(28px, 3vw, 44px);
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.68;
}

@media (min-width: 1120px) {
  .report-workspace {
    grid-template-columns: minmax(0, 1fr) 190px;
    column-gap: clamp(20px, 2vw, 30px);
  }

  .report-workspace > .section-index {
    padding-left: 0;
  }

  .report-workspace .section-index button {
    min-height: 38px;
    padding-block: 7px;
    font-size: 12.5px;
  }
}

/* ----------------------------------------------------------- pitch object */

.report-workspace .pitch-figure {
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
  margin: clamp(22px, 2.6vw, 34px) 0;
  overflow: hidden;
  border: 1px solid var(--border-subtle);
  background: var(--surface-sunken);
}

.report-workspace .pitch-svg {
  width: 100%;
  max-width: none;
  border-radius: 0;
}

.diagram-context {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  min-height: 36px;
  padding: 9px 12px 8px;
  color: var(--text-muted);
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border-subtle);
}

.diagram-context span {
  color: var(--text-primary);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.diagram-context small {
  font-size: 11.5px;
}

.pitch-figure-sequence .diagram-context span { color: var(--info-text); }
.pitch-figure-board .diagram-context span { color: var(--brand-accent); }

.report-workspace .pitch-figure figcaption {
  margin: 0;
  padding: 11px 13px 12px;
  background: var(--surface-raised);
  border-top: 1px solid var(--border-subtle);
  line-height: 1.45;
}

.report-workspace .pitch-figure figcaption strong {
  color: var(--text-primary);
  font-size: 13px;
}

.report-workspace .pitch-figure figcaption small {
  font-size: 11.5px;
}

.pitch-label-leader {
  stroke: color-mix(in srgb, var(--text-on-accent) 62%, transparent);
  stroke-width: 0.22;
  vector-effect: non-scaling-stroke;
}

.pitch-position .name,
.pitch-label {
  font-size: 2.45px;
  stroke-width: 0.78px;
}

.pitch-position.is-opponent circle {
  stroke: var(--text-on-accent);
  stroke-width: 1.4px;
  stroke-dasharray: 2.2 1.35;
}

/* Density must read after the people and the route. The cells retain their
   relative scale, but their pigment is deliberately quiet beneath the inline
   opacity calculated by the diagram. */
.pitch-cell { fill: color-mix(in srgb, var(--brand-accent) 46%, transparent); }
.pitch-cell-opponent { fill: color-mix(in srgb, var(--danger-text) 34%, transparent); }
.pitch-zone { fill: color-mix(in srgb, var(--brand-accent) 13%, transparent); }
.pitch-zone-label { opacity: 0.62; }

.pitch-edge-seq-worked { stroke: var(--success-text); opacity: 1; }
.pitch-edge-seq-failed {
  stroke: var(--danger-text);
  stroke-dasharray: 1.6 1.15;
  opacity: 1;
}
.pitch-arrow-seq-worked { fill: var(--success-text); }
.pitch-arrow-seq-failed { fill: var(--danger-text); }

.pitch-terminal circle {
  fill: var(--surface-base);
  stroke-width: 0.42;
}
.pitch-terminal path {
  fill: none;
  stroke-width: 0.42;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.pitch-terminal-worked circle { stroke: var(--success-text); }
.pitch-terminal-worked path { stroke: var(--success-text); }
.pitch-terminal-failed circle { stroke: var(--danger-text); }
.pitch-terminal-failed path { stroke: var(--danger-text); }

/* ---------------------------------------------------------- global legend */

.tactical-legend {
  position: sticky;
  top: var(--sticky-top);
  z-index: 18;
  display: flex;
  align-items: center;
  gap: var(--space-4);
  min-width: 0;
  padding: 10px 13px;
  color: var(--text-secondary);
  background: color-mix(in srgb, var(--surface-base) 94%, transparent);
  border: 1px solid var(--border-subtle);
  backdrop-filter: blur(12px);
}

.tactical-legend > strong {
  flex: none;
  color: var(--text-primary);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.tactical-legend > div {
  display: flex;
  align-items: center;
  gap: 15px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: thin;
}

.legend-item {
  flex: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-size: 11.5px;
}

.legend-mark {
  position: relative;
  display: inline-block;
  flex: none;
  width: 22px;
  height: 12px;
}

.legend-basel,
.legend-opponent,
.legend-shot,
.legend-goal {
  width: 10px;
  height: 10px;
  border-radius: 50%;
}
.legend-basel { background: var(--brand-accent); border: 1px solid var(--text-on-accent); }
.legend-opponent { border: 1.5px dashed var(--text-primary); }
.legend-shot { border: 1.5px solid var(--brand-accent); }
.legend-goal { background: var(--brand-accent); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand-accent) 22%, transparent); }

.legend-progression::before,
.legend-circulation::before,
.legend-carry::before {
  content: '';
  position: absolute;
  left: 0;
  right: 4px;
  top: 5px;
  border-top: 2px solid var(--brand-accent);
}
.legend-progression::after,
.legend-circulation::after {
  content: '';
  position: absolute;
  right: 0;
  top: 2px;
  border: 4px solid transparent;
  border-left-color: var(--brand-accent);
}
.legend-circulation::before { border-top-color: var(--border-strong); }
.legend-circulation::after { border-left-color: var(--border-strong); }
.legend-carry::before { border-top-style: dashed; border-top-color: var(--success-text); }

.legend-failed::before,
.legend-failed::after {
  content: '';
  position: absolute;
  left: 10px;
  top: 0;
  height: 12px;
  border-left: 2px solid var(--danger-text);
  transform: rotate(45deg);
}
.legend-failed::after { transform: rotate(-45deg); }

.legend-density,
.legend-occupied,
.legend-value {
  width: 14px;
  height: 10px;
}
.legend-density { background: color-mix(in srgb, var(--danger-text) 24%, transparent); }
.legend-occupied { background: color-mix(in srgb, var(--brand-accent) 22%, transparent); }
.legend-value { border: 1.5px dashed var(--warning-text); }

/* ---------------------------------------------------------- master model */

.tactical-master {
  scroll-margin-top: calc(var(--sticky-top) + 56px);
  padding: clamp(26px, 3vw, 42px);
  border-top: 4px solid var(--brand-accent);
  background: linear-gradient(145deg, var(--surface-raised), var(--surface-sunken));
}

.tactical-master h3 {
  margin: 0;
  font-size: clamp(34px, 4vw, 60px);
  line-height: 0.98;
  letter-spacing: -0.055em;
  text-transform: uppercase;
}

.tactical-master > .pitch-figure {
  margin: 0;
  border-color: var(--border-strong);
}

.master-takeaways {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1px;
  margin-top: var(--space-5);
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
}

.master-takeaways p {
  margin: 0;
  padding: var(--space-4);
  color: var(--text-secondary);
  background: var(--surface-raised);
  font-size: 13.5px;
  line-height: 1.55;
}

.master-takeaways span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-primary);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.master-reading {
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--border-subtle);
}
.master-reading summary {
  color: var(--text-secondary);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 750;
}
.master-reading > div { max-width: var(--report-reading); margin-top: var(--space-3); }
.master-reading p { margin: 0; color: var(--text-secondary); line-height: 1.65; }

/* --------------------------------------------------------- structure view */

.structure-report {
  display: grid;
  gap: clamp(38px, 5vw, 68px);
  margin-top: clamp(30px, 4vw, 54px);
}

.structure-stage {
  min-width: 0;
  padding-top: var(--space-4);
  border-top: 1px solid var(--border-strong);
}

.structure-stage > header {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
}

.structure-stage > header span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--text-on-accent);
  background: var(--brand-accent);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 850;
}

.structure-stage > header h4 {
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(19px, 1.7vw, 25px);
  line-height: 1.2;
}

.structure-stage-layout {
  display: grid;
  grid-template-columns: minmax(250px, 0.7fr) minmax(0, 1.45fr);
  gap: clamp(24px, 3vw, 46px);
  align-items: start;
}

.structure-stage-copy {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.68;
}
.structure-stage-copy p { margin: 0 0 var(--space-4); }
.structure-stage-copy p:last-child { margin-bottom: 0; }
.structure-stage .pitch-figure { margin: 0; }

.structure-stage-primary {
  padding: clamp(20px, 2.5vw, 32px);
  border-top: 3px solid var(--brand-accent);
  background: var(--surface-sunken);
}

.structure-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 2.5vw, 34px);
}

.structure-stage-secondary .structure-stage-layout {
  grid-template-columns: minmax(0, 1fr);
}

.structure-stage-secondary .structure-stage-copy {
  min-height: 9.5em;
}

.structure-stage-opponent {
  padding: clamp(20px, 2.5vw, 30px);
  background: color-mix(in srgb, var(--danger-text) 5%, var(--surface-sunken));
  border-top: 2px solid color-mix(in srgb, var(--danger-text) 66%, var(--border-strong));
}

/* -------------------------------------------------------- mechanism block */

.mechanism-overview,
.channel-overview {
  display: grid;
  grid-template-columns: minmax(260px, 0.65fr) minmax(0, 1.35fr);
  gap: clamp(26px, 3.5vw, 52px);
  align-items: start;
  margin: clamp(30px, 4vw, 52px) 0;
}

.mechanism-overview > div,
.channel-overview > div {
  color: var(--text-secondary);
  font-size: 15px;
  line-height: 1.68;
}
.mechanism-overview p,
.channel-overview p { margin: 0 0 var(--space-3); }
.mechanism-overview .pitch-figure,
.channel-overview .pitch-figure { margin: 0; }

.mechanism-block {
  margin-top: clamp(64px, 8vw, 110px);
  padding-top: clamp(22px, 2.5vw, 34px);
  border-top: 3px solid var(--brand-accent);
}

/* The gap exists to separate one mechanism from the last, so the first one in a
   section has nothing to be separated from. */
.progression-report > .mechanism-block:first-child { margin-top: clamp(20px, 2.5vw, 34px); }

.mechanism-title > span,
.mechanism-explanation > span {
  display: block;
  margin-bottom: var(--space-2);
  color: var(--brand-accent);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.mechanism-title h4 {
  max-width: 28ch;
  margin: 0;
  color: var(--text-primary);
  font-size: clamp(28px, 3.1vw, 46px);
  line-height: 1.03;
  letter-spacing: -0.045em;
  text-wrap: balance;
}

.mechanism-title p {
  max-width: 68ch;
  margin: var(--space-4) 0 0;
  color: var(--text-primary);
  font-size: clamp(17px, 1.45vw, 21px);
  font-weight: 650;
  line-height: 1.55;
}

.mechanism-primary {
  display: grid;
  grid-template-columns: minmax(250px, 0.62fr) minmax(0, 1.38fr);
  gap: clamp(26px, 3.5vw, 54px);
  align-items: start;
  margin-top: clamp(28px, 3.5vw, 48px);
}

.mechanism-primary .pitch-figure { margin: 0; }

.mechanism-explanation {
  padding-top: var(--space-3);
  color: var(--text-secondary);
}
.mechanism-explanation p {
  margin: 0 0 var(--space-4);
  font-size: 15px;
  line-height: 1.7;
}

/* The further relations a finding argues from, drawn beside each other so the
   difference between two routes is a comparison rather than a scroll. */
.mechanism-secondary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 32px);
  margin-top: clamp(22px, 3vw, 38px);
}

.mechanism-secondary .pitch-figure { margin: 0; }

/* One further map lines up under the first rather than leaving a hole beside
   it; two or more sit side by side, which is what makes them comparable. */
.mechanism-secondary:has(> .pitch-figure:only-child) {
  grid-template-columns: minmax(250px, 0.62fr) minmax(0, 1.38fr);
}
.mechanism-secondary > .pitch-figure:only-child { grid-column: 2; }

.sequence-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.5vw, 32px);
  margin-top: clamp(30px, 4vw, 52px);
}

.sequence-example {
  min-width: 0;
  overflow: hidden;
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--success-text);
}
.sequence-example.is-failed,
.sequence-example.is-lost { border-top-color: var(--danger-text); }
.sequence-example.is-unavailable { border-top-color: var(--text-muted); }

.sequence-example > header {
  display: grid;
  grid-template-columns: 18px auto minmax(0, 1fr);
  gap: var(--space-2);
  align-items: center;
  padding: 12px 14px;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border-subtle);
}
.sequence-example > header strong {
  color: var(--success-text);
  font-size: 11px;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.sequence-example.is-failed > header strong,
.sequence-example.is-lost > header strong { color: var(--danger-text); }
.sequence-example > header small {
  color: var(--text-muted);
  font-size: 11.5px;
  text-align: right;
}

.sequence-outcome-icon {
  position: relative;
  width: 16px;
  height: 16px;
  border: 1.5px solid var(--success-text);
  border-radius: 50%;
}
.sequence-outcome-icon::after {
  content: '';
  position: absolute;
  left: 4px;
  top: 2px;
  width: 4px;
  height: 7px;
  border: solid var(--success-text);
  border-width: 0 1.5px 1.5px 0;
  transform: rotate(45deg);
}
.sequence-example.is-failed .sequence-outcome-icon,
.sequence-example.is-lost .sequence-outcome-icon { border-color: var(--danger-text); }
.sequence-example.is-failed .sequence-outcome-icon::before,
.sequence-example.is-failed .sequence-outcome-icon::after,
.sequence-example.is-lost .sequence-outcome-icon::before,
.sequence-example.is-lost .sequence-outcome-icon::after {
  content: '';
  position: absolute;
  left: 7px;
  top: 2px;
  width: 0;
  height: 10px;
  border: 0;
  border-left: 1.5px solid var(--danger-text);
  transform: rotate(45deg);
}
.sequence-example.is-failed .sequence-outcome-icon::after,
.sequence-example.is-lost .sequence-outcome-icon::after { transform: rotate(-45deg); }

.sequence-example .pitch-figure {
  margin: 0;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
}
.sequence-example .diagram-context { display: none; }
.sequence-example .pitch-figure figcaption { display: none; }

.sequence-summary {
  display: grid;
  gap: 5px;
  padding: 13px 15px;
  border-bottom: 1px solid var(--border-subtle);
}
.sequence-summary code {
  overflow-wrap: anywhere;
  color: var(--text-primary);
  font-family: var(--font-figure);
  font-size: 12.5px;
  line-height: 1.5;
}
.sequence-summary small { color: var(--text-muted); font-size: 11.5px; }

.sequence-explanation,
.sequence-absence-copy {
  padding: 14px 15px 16px;
}
.sequence-explanation p,
.sequence-absence-copy p {
  margin: 0 0 var(--space-3);
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.62;
}
.sequence-explanation p:last-child,
.sequence-absence-copy p:last-child { margin-bottom: 0; }
.sequence-absence-copy { display: grid; min-height: 270px; place-items: center; }

.evidence-strip {
  display: flex;
  align-items: stretch;
  gap: 1px;
  margin-top: var(--space-4);
  overflow-x: auto;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
}
.evidence-strip > b,
.evidence-strip > span {
  flex: 1 0 130px;
  display: flex;
  align-items: baseline;
  gap: 7px;
  padding: 11px 13px;
  background: var(--surface-raised);
}
.evidence-strip > b {
  flex: 0 0 auto;
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.evidence-strip > span { color: var(--text-secondary); font-size: 11.5px; }
.evidence-strip strong { color: var(--text-primary); font-family: var(--font-figure); font-size: 18px; }

.tactical-conclusion {
  margin-top: clamp(48px, 6vw, 78px);
  padding: clamp(20px, 2.4vw, 30px);
  background: var(--surface-sunken);
  border-left: 3px solid var(--brand-accent);
}
.tactical-conclusion .mechanism-head { margin: 0 0 var(--space-3); padding: 0; border: 0; }
.tactical-conclusion .mechanism-head h4 { font-size: 20px; }

/* --------------------------------------------------------- channel compare */

.channel-comparison {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(14px, 1.8vw, 24px);
  margin-top: clamp(34px, 4vw, 54px);
}

.channel-card {
  min-width: 0;
  padding: clamp(18px, 2vw, 26px);
  background: var(--surface-sunken);
  border-top: 3px solid var(--border-strong);
}
.channel-card > span {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
}
.channel-card h4 {
  margin: 8px 0 var(--space-4);
  color: var(--text-primary);
  font-size: clamp(20px, 1.8vw, 26px);
  line-height: 1.15;
}
.channel-card p {
  margin: 0 0 var(--space-3);
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.62;
}
.channel-right { border-top-color: var(--brand-accent); }
.channel-centre { border-top-color: var(--danger-text); }
.channel-left { border-top-color: var(--info-text); }
.channel-mechanism { margin-top: clamp(48px, 6vw, 82px); }
.channel-mechanism .mechanism-block { margin-top: 0; }

.report-appendix {
  margin-top: var(--space-4);
  padding: 0;
  border: 1px solid var(--border-subtle);
}
.report-appendix > summary {
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
  padding: 16px 18px;
  background: var(--surface-sunken);
}
.report-appendix > summary h3 { font-size: 18px; }
.report-appendix[open] > summary { margin-bottom: 0; border-bottom: 1px solid var(--border-subtle); }
.report-appendix > .analysis-section,
.report-appendix > .report-players { margin-inline: clamp(16px, 2vw, 28px); }

/* ------------------------------------------------------------- responsive */

.report-workspace .analysis-section,
.tactical-master,
.report-appendix { scroll-margin-top: calc(var(--sticky-top) + 58px); }

@media (max-width: 1119px) {
  .tactical-legend { position: static; }
  .report-workspace .analysis-section,
  .tactical-master,
  .report-appendix { scroll-margin-top: var(--sticky-top); }
}

@media (max-width: 980px) {
  .structure-stage-layout,
  .mechanism-primary,
  .mechanism-overview,
  .channel-overview {
    grid-template-columns: minmax(0, 1fr);
  }

  .structure-stage-copy,
  .mechanism-explanation,
  .mechanism-overview > div,
  .channel-overview > div { max-width: var(--report-reading); }
  .mechanism-primary .pitch-figure { order: -1; }
}

@media (max-width: 760px) {
  .report-workspace .analysis-flow { gap: 16px; }
  .report-workspace .analysis-section { padding-inline: 16px; }
  .report-workspace .analysis-lede { padding-inline: 18px; }
  .tactical-master { padding: 20px 16px; }
  .tactical-master h3 { font-size: clamp(34px, 12vw, 48px); }
  .master-takeaways,
  .structure-secondary,
  .sequence-comparison,
  .mechanism-secondary,
  .channel-comparison { grid-template-columns: minmax(0, 1fr); }
  .structure-stage-secondary .structure-stage-copy { min-height: 0; }
  .sequence-absence-copy { min-height: 170px; }
  .mechanism-block { margin-top: 64px; }
  .mechanism-title h4 { font-size: 32px; }
  .diagram-context { align-items: flex-start; }
  .diagram-context small { text-align: right; }
  .pitch-position .name,
  .pitch-label { font-size: 2.65px; }
  .report-appendix > summary { align-items: flex-start; flex-direction: column; }
}

/* ========================================================================== *
 * Editorial architecture, sections 0 to 4
 * ========================================================================== */

.report-workspace {
  --report-reading: 70ch;
  width: min(100%, 1450px);
  margin-inline: auto;
}

/* Three explicit visual weights. Width belongs to the idea, not to the pitch
   component merely because it can expand. */
.report-workspace .pitch-figure.diagram-primary {
  width: min(100%, 820px);
  max-width: 820px;
}
.report-workspace .pitch-figure.diagram-supporting {
  width: min(100%, 680px);
  max-width: 680px;
}
.report-workspace .pitch-figure.diagram-example {
  width: min(100%, 440px);
  max-width: 440px;
}
.report-workspace .pitch-figure[class*="diagram-"] { margin-inline: auto; }

.pitch-position.is-lineup-hidden,
.pitch-edge.is-lineup-hidden { display: none; }
.pitch-position .count { font-size: 2.25px; font-weight: 900; }
.pitch-position .node-failed {
  fill: var(--danger-text);
  stroke: var(--surface-base);
  stroke-width: .55px;
  font-size: 2px;
  font-weight: 900;
  text-anchor: middle;
}
.pitch-touch-envelope {
  fill: color-mix(in srgb, var(--info-text) 8%, transparent);
  stroke: var(--info-text);
  stroke-width: .22;
  stroke-dasharray: 1.2 .8;
}

.diagram-lineup-control {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  padding: 9px 12px;
  overflow-x: auto;
  background: var(--surface-raised);
  border-bottom: 1px solid var(--border-subtle);
}
.diagram-lineup-control > span {
  flex: none;
  margin-right: 3px;
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.diagram-lineup-control button {
  flex: none;
  min-height: 28px;
  padding: 4px 9px;
  color: var(--text-secondary);
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-round);
  font-size: 11px;
  cursor: pointer;
}
.diagram-lineup-control button.active {
  color: var(--text-on-accent);
  background: var(--brand-accent);
  border-color: var(--brand-accent);
}
.diagram-lineup-control small {
  flex: 1 0 220px;
  margin-left: 4px;
  color: var(--text-muted);
  font-size: 10.5px;
  line-height: 1.35;
}

.involvement-legend {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 7px;
  padding: 8px 12px;
  color: var(--text-muted);
  background: var(--surface-raised);
  border-top: 1px solid var(--border-subtle);
}
.involvement-legend > span,
.involvement-legend > em {
  font-size: 10px;
  font-style: normal;
}
.involvement-legend > span { margin-right: 3px; font-weight: 800; text-transform: uppercase; }
.involvement-legend > em { margin-left: auto; }
.involvement-legend i {
  width: 9px;
  height: 9px;
  background: var(--brand-accent);
  border: 1px solid var(--text-on-accent);
  border-radius: 50%;
}
.involvement-legend small { font-size: 10px; }

.diagram-comparison,
.route-info {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1px;
  background: var(--border-subtle);
  border-top: 1px solid var(--border-subtle);
}
.diagram-comparison p,
.route-info span {
  margin: 0;
  padding: 10px 12px;
  background: var(--surface-raised);
}
.diagram-comparison span,
.route-info span {
  color: var(--text-muted);
  font-size: 10.5px;
}
.diagram-comparison strong,
.route-info strong {
  display: block;
  margin-bottom: 2px;
  color: var(--text-primary);
  font-size: 13px;
}
.diagram-comparison .is-success strong { color: var(--success-text); }
.diagram-comparison .is-danger strong { color: var(--danger-text); }

/* Section 0 is result, verdict, model and takeaways in one card. */
.tactical-master.report-opening h2 {
  margin: 0;
  font-size: clamp(32px, 4vw, 56px);
  line-height: 1.02;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.tactical-master.report-opening > .diagram-primary { margin-inline: auto; }

.exit-main,
.attack-overview-item,
.chance-report-layout {
  display: grid;
  grid-template-columns: minmax(270px, .72fr) minmax(0, 1.28fr);
  gap: clamp(26px, 3.5vw, 52px);
  align-items: start;
  margin-top: clamp(28px, 3.5vw, 48px);
}
.exit-main > div,
.attack-overview-item > div,
.chance-report-copy {
  max-width: var(--report-reading);
  color: var(--text-secondary);
}
.exit-main .pitch-figure,
.attack-overview-item .pitch-figure { margin: 0; }

.attack-overviews {
  display: grid;
  gap: clamp(32px, 4vw, 52px);
  margin-top: clamp(28px, 3.5vw, 48px);
}
.attack-overview-2 { grid-template-columns: minmax(0, 1.28fr) minmax(270px, .72fr); }
.attack-overview-2 > div { order: 2; }

.channel-stories {
  display: grid;
  gap: clamp(44px, 6vw, 78px);
  margin-top: clamp(54px, 7vw, 92px);
}
.channel-story {
  min-width: 0;
  padding-top: 22px;
  border-top: 4px solid var(--brand-accent);
}
.channel-story.channel-centre { border-top-color: var(--danger-text); }
.channel-story.channel-left { border-top-color: var(--info-text); }
.channel-story > header { max-width: 760px; }
.channel-story > header > span {
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.channel-story > header h4 {
  max-width: 27ch;
  margin: 8px 0 12px;
  font-size: clamp(28px, 3vw, 44px);
  line-height: 1.04;
  letter-spacing: -.04em;
}
.channel-story > header p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 16px;
  line-height: 1.6;
}
.channel-fields {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  margin-top: 24px;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
}
.channel-field {
  min-width: 0;
  padding: 16px;
  background: var(--surface-sunken);
}
.channel-field h5 {
  margin: 0 0 9px;
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.channel-field p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 13.5px;
  line-height: 1.58;
}
.channel-diagrams {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(18px, 2.4vw, 30px);
  align-items: start;
  margin-top: 28px;
}
.channel-diagrams:has(> :only-child) { grid-template-columns: minmax(0, 680px); }
.channel-diagrams .pitch-figure { width: 100%; margin: 0; }

.chance-report-layout { grid-template-columns: minmax(280px, .62fr) minmax(0, 1.38fr); }
.report-interactive-shotmap .analysis-figure { margin: 0; }
.report-interactive-shotmap .analysis-figure > :not(figcaption) { padding: 14px; }
.report-interactive-shotmap .figure-pitch { max-width: 680px; }

@media (max-width: 1040px) {
  .channel-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 980px) {
  .exit-main,
  .attack-overview-item,
  .attack-overview-2,
  .chance-report-layout { grid-template-columns: minmax(0, 1fr); }
  .attack-overview-2 > div { order: 0; }
  .exit-main .pitch-figure,
  .attack-overview-item .pitch-figure { margin-inline: auto; }
}

@media (max-width: 760px) {
  .report-workspace .pitch-figure.diagram-primary,
  .report-workspace .pitch-figure.diagram-supporting,
  .report-workspace .pitch-figure.diagram-example { width: 100%; max-width: none; }
  .channel-fields,
  .channel-diagrams { grid-template-columns: minmax(0, 1fr); }
  .diagram-lineup-control small { display: none; }
  .involvement-legend > em { flex-basis: 100%; margin-left: 0; }
  .tactical-master.report-opening h2 { font-size: clamp(30px, 10vw, 44px); }
  .channel-story > header h4 { font-size: 30px; }
}

/* ========================================================================== *
 * Container-aware report layout
 *
 * The match shell is deliberately separate from the rest of the site. The
 * ordinary dashboard remains capped at 1500px; the report uses the actual
 * available page width and stops only at an ultrawide publication ceiling.
 * Components then respond to their own inline size rather than the monitor.
 * ========================================================================== */

.match-page.report-page-active {
  --report-page-gutter: clamp(16px, 2.2vw, 42px);
  width: min(2320px, calc(100% - 2 * var(--report-page-gutter)));
}

.sticky-report-nav {
  position: sticky;
  top: var(--masthead-height);
  z-index: 18;
  margin-top: 45px;
  background: var(--surface-base);
}
.sticky-report-nav .analysis-tabs {
  position: static;
  top: auto;
  margin: 0;
}
.report-legend-slot:empty { display: none; }
.sticky-report-nav .tactical-legend {
  position: static;
  top: auto;
  margin: 0;
  border-top: 0;
  backdrop-filter: none;
}

.report-workspace {
  --report-columns: repeat(12, minmax(0, 1fr));
  --report-gap: clamp(16px, 1.2vw, 28px);
  --report-reading: 72ch;
  width: 100%;
  max-width: none;
  margin: 0;
  margin-right: 0;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--report-gap);
}
.report-main {
  min-width: 0;
  container: report-main / inline-size;
}
.report-section {
  min-width: 0;
  container: report-section / inline-size;
}
.structure-stage,
.sequence-example,
.channel-detail,
.report-shot-component {
  min-width: 0;
  container: tactical-component / inline-size;
}

@media (min-width: 1120px) {
  .report-workspace {
    grid-template-columns: minmax(0, 1fr) clamp(210px, 11vw, 280px);
    column-gap: var(--report-gap);
  }
  .report-workspace > .section-index {
    padding-left: 0;
  }
}

.report-workspace .analysis-section {
  padding-inline: clamp(20px, 2.1cqi, 44px);
}

/* Pitches retain semantic scale without becoming wall-sized on QHD. */
.report-workspace .pitch-figure[class*="diagram-"] {
  width: 100%;
  margin-inline: 0;
}
.report-workspace .pitch-figure.diagram-primary { max-width: 1050px; }
.report-workspace .pitch-figure.diagram-supporting { max-width: 900px; }
.report-workspace .pitch-figure.diagram-example { max-width: 540px; }

/* Hero: headline and verdict above the model, never beside it. */
.tactical-master.report-opening {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 2.5cqi, 40px);
  container: report-hero / inline-size;
}
.tactical-master.report-opening h2 {
  max-width: 31ch;
  margin: 4px 0 0;
  font-size: clamp(32px, 3.4cqi, 52px);
  line-height: 1.02;
}
.tactical-master.report-opening > .diagram-primary {
  justify-self: center;
  max-width: 1050px;
  margin: 0;
}
.tactical-master.report-opening > .master-takeaways {
  width: 100%;
  margin-top: 0;
}
@container report-hero (max-width: 759px) {
  .master-takeaways { grid-template-columns: minmax(0, 1fr); }
}

/* Structural stages. The copy column owns its selected-player detail and the
   pitch starts on the same row as the subsection heading. */
.structure-report { gap: clamp(30px, 3.5cqi, 54px); }
.structure-stage,
.structure-stage-primary,
.structure-stage-opponent {
  padding: clamp(16px, 1.8cqi, 30px);
}
.structure-stage-layout,
.structure-stage-secondary .structure-stage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(20px, 2.2cqi, 38px);
  align-items: start;
}
.structure-stage-copy {
  min-width: 0;
  max-width: 74ch;
}
.structure-stage-copy > header {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 16px;
}
.structure-stage-copy > header span {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  flex: none;
  color: var(--text-on-accent);
  background: var(--brand-accent);
  border-radius: 50%;
  font-size: 11px;
  font-weight: 850;
}
.structure-stage-copy > header h4 {
  margin: 0;
  font-size: clamp(20px, 1.7cqi, 28px);
  line-height: 1.15;
}
.structure-stage-layout > .pitch-figure {
  width: 100%;
  max-width: 960px;
  margin: 0;
  justify-self: end;
}
.structure-secondary {
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(30px, 3.5cqi, 54px);
}
.structure-stage-secondary .structure-stage-copy { min-height: 0; }
.structure-stage-layout > .pitch-figure .pitch-readout,
.exit-main > .pitch-figure .pitch-readout,
.attack-overview-item > .pitch-figure .pitch-readout { display: none; }
.external-pitch-readout {
  margin: clamp(18px, 2cqi, 28px) 0 0;
  padding: 16px 18px;
  color: var(--text-secondary);
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--brand-accent);
  font-size: 13.5px;
  line-height: 1.58;
}
.external-pitch-readout[hidden] { display: none; }

@container tactical-component (min-width: 1080px) {
  .structure-stage-layout,
  .structure-stage-secondary .structure-stage-layout {
    grid-template-columns: minmax(36ch, .8fr) minmax(520px, 1.2fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "copy pitch"
      "detail pitch";
  }
  .structure-stage-copy { grid-area: copy; }
  .structure-stage-layout > .pitch-figure { grid-area: pitch; }
  .structure-stage-layout > .external-pitch-readout { grid-area: detail; }
}

/* Main text/visual splits stack before prose can fall below a useful measure. */
.exit-main,
.attack-overview-item,
.chance-report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 3cqi, 50px);
  align-items: start;
  margin-top: clamp(26px, 3cqi, 46px);
}
.exit-main > div,
.attack-overview-item > div,
.chance-report-copy {
  min-width: 0;
  max-width: 76ch;
}
.exit-main > .pitch-figure,
.attack-overview-item > .pitch-figure {
  width: 100%;
  max-width: 920px;
  margin: 0;
  justify-self: end;
}
.attack-overviews { gap: clamp(30px, 4cqi, 56px); }
.attack-overview-2 > div { order: 0; }

@container report-section (min-width: 1080px) {
  .exit-main,
  .attack-overview-item,
  .chance-report-layout {
    grid-template-columns: minmax(36ch, 5fr) minmax(520px, 7fr);
  }
  .exit-main,
  .attack-overview-item {
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "copy pitch"
      "detail pitch";
  }
  .exit-main > div,
  .attack-overview-item > div { grid-area: copy; }
  .exit-main > .pitch-figure,
  .attack-overview-item > .pitch-figure { grid-area: pitch; }
  .exit-main > .external-pitch-readout,
  .attack-overview-item > .external-pitch-readout { grid-area: detail; }
}

/* Worked/failed examples: pitch first, chain and note beneath, detail folded. */
.sequence-comparison {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--report-gap);
  align-items: start;
}
.sequence-example {
  display: block;
  align-self: start;
}
.sequence-example > .pitch-figure {
  width: 100%;
  max-width: 540px;
  margin: 0 auto;
}
.sequence-summary { padding: 14px 16px; }
.sequence-detail {
  border-top: 1px solid var(--border-subtle);
}
.sequence-detail summary {
  padding: 12px 16px;
  color: var(--text-primary);
  font-size: 12.5px;
  font-weight: 800;
  cursor: pointer;
}
.sequence-detail .sequence-explanation { padding: 0 16px 16px; }
.sequence-detail .sequence-explanation p { margin: 0; }
@container report-section (min-width: 880px) {
  .sequence-comparison { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* Spatial comparison is always LEFT, CENTRE, RIGHT. Cards size naturally and
   the detailed route evidence lives in one tabbed component below them. */
.channel-stories {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--report-gap);
  align-items: start;
  margin-top: clamp(46px, 5cqi, 74px);
}
.channel-story {
  display: block;
  align-self: start;
  padding: clamp(18px, 1.6cqi, 28px);
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--brand-accent);
}
.channel-story.channel-centre { border-top-color: var(--danger-text); }
.channel-story.channel-left { border-top-color: var(--info-text); }
.channel-story > header { max-width: none; }
.channel-story > header h4 {
  min-height: 0;
  margin: 8px 0 12px;
  font-size: clamp(23px, 2cqi, 33px);
}
.channel-story > header p { font-size: 14px; line-height: 1.58; }
.channel-fields {
  grid-template-columns: minmax(0, 1fr);
  margin-top: 18px;
}
.channel-field { padding: 14px; }
.channel-field p { font-size: 13px; line-height: 1.52; }
@container report-section (min-width: 1040px) {
  .channel-stories { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.channel-detail {
  margin-top: clamp(42px, 5cqi, 76px);
  padding: clamp(18px, 2cqi, 32px);
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  border-top: 4px solid var(--brand-accent);
}
.channel-detail-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--border-subtle);
}
.channel-detail-head span,
.channel-detail-summary > strong {
  color: var(--brand-accent);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.channel-detail-head h4 { margin: 5px 0 0; font-size: clamp(24px, 2.3cqi, 36px); }
.channel-detail-tabs { display: flex; min-width: 0; overflow-x: auto; }
.channel-detail-tabs button,
.report-shot-team button {
  min-height: 38px;
  padding: 8px 16px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-strong);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.channel-detail-tabs button + button,
.report-shot-team button + button { border-left: 0; }
.channel-detail-tabs button.active,
.report-shot-team button.active {
  color: var(--text-on-accent);
  background: var(--brand-accent);
  border-color: var(--brand-accent);
}
.channel-detail-summary {
  display: grid;
  gap: 8px;
  margin: 18px 0;
}
.channel-detail-summary > strong { color: var(--text-primary); }
.channel-detail-summary p { max-width: 82ch; margin: 0; color: var(--text-secondary); }
.channel-detail-maps,
.channel-detail-pattern {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--report-gap);
  align-items: start;
}
.channel-detail-maps .pitch-figure { width: 100%; max-width: 760px; margin: 0; }
.channel-detail-pattern section { max-width: 76ch; padding: 18px; background: var(--surface-raised); }
.channel-detail-pattern h5 { margin: 0 0 10px; color: var(--text-muted); font-size: 11px; text-transform: uppercase; }
.channel-detail-pattern p { margin: 0; color: var(--text-secondary); }
.channel-examples { margin-top: var(--report-gap); }
@container tactical-component (min-width: 980px) {
  .channel-detail-maps,
  .channel-detail-pattern { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* The report reuses Analysis' shot exploration and adds team/outcome controls. */
.chance-report-layout { align-items: start; }
.report-shot-component { width: 100%; }
.report-shot-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 14px;
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  border-bottom: 0;
}
.report-shot-team { display: flex; }
.report-shot-legend { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px 13px; }
.shot-key { display: inline-flex; align-items: center; gap: 6px; color: var(--text-muted); font-size: 11px; white-space: nowrap; }
.shot-key i { position: relative; width: 11px; height: 11px; border: 2px solid var(--brand-accent); border-radius: 50%; }
.shot-key-goal i { background: var(--goal-marker); border-color: var(--text-on-accent); }
.shot-key-saved i::after { content: ''; position: absolute; inset: 2px; background: var(--text-on-accent); border-radius: 50%; }
.shot-key-blocked i::before,
.shot-key-blocked i::after { content: ''; position: absolute; left: 4px; top: 0; width: 1px; height: 8px; background: var(--text-on-accent); transform: rotate(45deg); }
.shot-key-blocked i::after { transform: rotate(-45deg); }
.shot-key-off-target i { background: transparent; border-style: dashed; opacity: .8; }
.report-interactive-shotmap .analysis-figure {
  max-width: none;
  margin: 0;
  border-top: 0;
}
.report-interactive-shotmap .analysis-figure > :not(figcaption) { padding: 14px; }
.report-interactive-shotmap .figure-pitch {
  width: 100%;
  max-width: 820px;
  margin-inline: auto;
}
.report-interactive-shotmap .figure-shot-card { max-width: none; }
.report-interactive-shotmap .shot-point .shot-outcome-mark {
  fill: none;
  stroke: var(--text-on-accent);
  stroke-width: .34;
  stroke-linecap: round;
  pointer-events: none;
}
.report-interactive-shotmap .shot-point .shot-outcome-core { fill: var(--text-on-accent); stroke: none; }
.report-interactive-shotmap .shot-point.outcome-off-target .shot-dot { fill: transparent; stroke-dasharray: 1 .65; opacity: .9; }
.report-interactive-shotmap .shot-point.outcome-blocked .shot-dot { fill: var(--danger-text); }
.report-interactive-shotmap .shot-point.outcome-saved .shot-dot { fill: var(--brand-accent); }
.report-interactive-shotmap .shot-point.outcome-goal .shot-dot { fill: var(--goal-marker); }

/* Opponent section: primary structural map and three mechanisms, with a real
   supporting example centred below at 40-50% of the section width. */
.opponent-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--report-gap);
  align-items: start;
}
.opponent-main > .pitch-figure {
  width: 100%;
  max-width: 900px;
  margin: 0;
}
.opponent-threats {
  display: grid;
  gap: 1px;
  align-self: start;
  background: var(--border-subtle);
  border: 1px solid var(--border-subtle);
}
.opponent-threat { padding: 17px 19px; background: var(--surface-sunken); }
.opponent-threat > span { color: var(--danger-text); font-size: 10px; font-weight: 850; letter-spacing: .12em; }
.opponent-threat h4 { margin: 5px 0 8px; font-size: 18px; }
.opponent-threat p { margin: 0; color: var(--text-secondary); font-size: 13.5px; line-height: 1.58; }
.opponent-example {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  width: min(50%, 720px);
  min-width: 460px;
  justify-self: center;
  margin-top: clamp(16px, 2cqi, 28px);
  padding-top: clamp(16px, 2cqi, 28px);
  border-top: 1px solid var(--border-subtle);
}
.opponent-example > .pitch-figure { width: 100%; max-width: none; margin: 0; }
.opponent-example > div > span,
.opponent-example > div > small { display: block; color: var(--text-muted); font-size: 11px; }
.opponent-example h4 { margin: 6px 0 10px; font-size: clamp(20px, 2cqi, 28px); }
.opponent-example code { color: var(--text-primary); font-family: var(--font-figure); }
.opponent-example small { margin-top: 6px; }
@container report-section (min-width: 1080px) {
  .opponent-main { grid-template-columns: repeat(12, minmax(0, 1fr)); }
  .opponent-main > .pitch-figure { grid-column: 1 / span 6; grid-row: 1; }
  .opponent-threats { grid-column: 7 / -1; grid-row: 1; }
  .opponent-example { grid-column: 1 / -1; grid-row: 2; }
}

/* Compact player ownership and a 2x2 decision matrix with a full conclusion. */
.mechanism-role-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: var(--report-gap);
  align-items: start;
}
.mechanism-role-card {
  min-width: 0;
  padding: clamp(18px, 1.6cqi, 27px);
  background: var(--surface-sunken);
  border-top: 3px solid var(--brand-accent);
}
.mechanism-role-card > span { color: var(--text-muted); font-size: 10px; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.mechanism-role-card h4 { margin: 8px 0 12px; font-size: 21px; }
.mechanism-role-card p { margin: 0; color: var(--text-secondary); font-size: 13.5px; line-height: 1.58; }
.verdict-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--report-gap);
  align-items: start;
}
.verdict-card {
  min-width: 0;
  padding: clamp(20px, 1.8cqi, 30px);
  background: var(--surface-sunken);
  border-top: 4px solid var(--brand-accent);
}
.verdict-worry { border-top-color: var(--danger-text); }
.verdict-hidden { border-top-color: var(--warning-text); }
.verdict-card > span { color: var(--text-primary); font-size: 13px; font-weight: 900; letter-spacing: .11em; text-transform: uppercase; }
.verdict-card p { margin: 14px 0 0; color: var(--text-secondary); font-size: 14px; line-height: 1.58; }
@container report-section (min-width: 760px) {
  .verdict-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .verdict-conclusion { grid-column: 1 / -1; }
}

/* Visual overlays can never steal a click from the player nodes above them. */
.pitch-detail,
.pitch-detail *,
.pitch-touch-envelope,
.pitch-touch-pass,
.pitch-touch-carry,
.pitch-touch-reception,
.pitch-edge,
.pitch-annotation { pointer-events: none; }
.pitch-position.is-clickable { pointer-events: auto; }

.layout-debug {
  position: fixed;
  right: 14px;
  bottom: 14px;
  z-index: 100;
  width: min(320px, calc(100vw - 28px));
  padding: 13px 15px;
  color: #fff;
  background: rgba(8, 11, 18, .94);
  border: 1px solid rgba(255,255,255,.28);
  box-shadow: 0 12px 38px rgba(0,0,0,.4);
  font: 12px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace;
}
.layout-debug strong { display: block; margin-bottom: 8px; color: #ffca28; }
.layout-debug dl { display: grid; gap: 4px; margin: 0; }
.layout-debug dl div { display: flex; justify-content: space-between; gap: 12px; }
.layout-debug dt { color: #aeb6c4; }
.layout-debug dd { margin: 0; text-align: right; }

@media (max-width: 799px) {
  .match-page.report-page-active { width: calc(100% - 24px); }
  .sticky-report-nav { margin-top: 26px; }
  .report-workspace .analysis-section { padding-inline: 16px; }
  .tactical-master.report-opening { padding: 20px 16px; }
  .report-workspace .pitch-figure.diagram-primary,
  .report-workspace .pitch-figure.diagram-supporting,
  .report-workspace .pitch-figure.diagram-example { max-width: none; }
  .channel-detail-head,
  .report-shot-toolbar { align-items: flex-start; flex-direction: column; }
  .report-shot-legend { justify-content: flex-start; }
  .opponent-example { width: 100%; min-width: 0; }
}

/* ========================================================================== *
 * Fixed report component contracts
 *
 * A report section owns one full-width editorial introduction and one
 * full-width body. Columns begin inside the body, never inside the intro.
 * ========================================================================== */

.report-workspace {
  --report-gap: clamp(20px, 1.5vw, 40px);
  --report-body-size: clamp(15px, calc(.25vw + 12px), 18px);
  --report-section-title: clamp(30px, calc(.9vw + 16px), 42px);
  --report-hero-title: clamp(42px, calc(2vw + 18px), 72px);
}

.report-section {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--report-gap);
  row-gap: 0;
  align-items: start;
}

.report-section > .report-section-header,
.report-section > .section-content {
  grid-column: 1 / -1;
  width: 100%;
  min-width: 0;
}

.report-workspace .report-section > .report-section-header {
  display: block;
  margin: 0 0 clamp(30px, 3cqi, 48px);
  padding: 0 0 clamp(28px, 2.5cqi, 42px);
  border-bottom: 1px solid var(--border-strong);
  text-align: center;
}

.report-workspace .report-section-header > .section-kicker {
  margin: 0 0 10px;
  color: var(--brand-accent);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: .14em;
  line-height: 1.3;
  text-align: center;
  text-transform: uppercase;
}

.report-workspace .report-section-header > .section-title {
  max-width: none;
  margin: 0;
  color: var(--text-primary);
  font-size: var(--report-section-title);
  line-height: 1.08;
  letter-spacing: -.035em;
  text-align: center;
}

.report-workspace .report-section > .report-section-header > .section-lead {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: min(100%, 1250px);
  max-width: none;
  margin: clamp(18px, 1.7cqi, 26px) auto 0;
  padding: 0;
  border: 0;
  color: inherit;
  font: inherit;
  text-align: center;
  text-wrap: initial;
}

.report-workspace .section-lead > p {
  display: block;
  width: 100%;
  margin: 0;
}

.report-workspace .section-lead > .section-lead-claim {
  max-width: none;
  color: var(--text-primary);
  font-size: clamp(21px, calc(.55vw + 13px), 29px);
  font-weight: 760;
  line-height: 1.35;
  text-wrap: balance;
}

.report-workspace .section-lead > .section-lead-explanation {
  width: min(100%, 1150px);
  max-width: none;
  margin-top: 12px;
  color: var(--text-secondary);
  font-size: clamp(16px, calc(.3vw + 12px), 20px);
  line-height: 1.55;
  text-wrap: pretty;
}

.section-content { container: section-content / inline-size; }
.section-content > :first-child { margin-top: 0; }

/* Opening composition: centred match conclusion, then the tactical model. */
.tactical-master.report-opening {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.report-workspace .tactical-master.report-opening > .report-section-header-hero {
  display: block;
  margin-bottom: 0;
  text-align: center;
}

.tactical-master.report-opening > .report-section-header-hero > .section-kicker {
  color: var(--brand-accent);
  letter-spacing: .16em;
  text-align: center;
}

.report-workspace .tactical-master.report-opening > .report-section-header-hero > .section-title {
  max-width: none;
  margin: clamp(8px, 1cqi, 16px) 0 0;
  font-size: var(--report-hero-title);
  line-height: .98;
  letter-spacing: -.045em;
  text-align: center;
}

.report-workspace .tactical-master.report-opening > .report-section-header-hero > .section-lead {
  align-items: center;
  text-align: center;
}

.tactical-master.report-opening > .report-section-header-hero .hero-football-headline {
  max-width: 54ch;
  margin: 6px auto 0;
  color: var(--text-primary);
  font-size: clamp(21px, 1.7cqi, 32px);
  font-weight: 780;
  line-height: 1.24;
  text-wrap: balance;
}

.tactical-master.report-opening > .report-section-header-hero .hero-tactical-verdict {
  max-width: 92ch;
  margin: 12px auto 0;
  color: var(--text-secondary);
  font-size: clamp(16px, 1.1cqi, 20px);
  font-weight: 560;
  line-height: 1.55;
}

.tactical-master.report-opening > .hero-section-content {
  display: grid;
  gap: clamp(28px, 2.4cqi, 42px);
}

.tactical-master.report-opening > .hero-section-content > .hero-model {
  border-top: 0;
}

.hero-model {
  display: grid;
  justify-items: center;
  gap: 18px;
  width: 100%;
  padding: clamp(24px, 2.4cqi, 40px) 0;
  border-top: 1px solid var(--border-strong);
  border-bottom: 1px solid var(--border-strong);
}

.tactical-master .hero-model > h3 {
  margin: 0;
  color: var(--text-primary);
  font-size: 12px;
  font-weight: 850;
  letter-spacing: .15em;
  text-transform: uppercase;
}

.tactical-master.report-opening .hero-model > .pitch-figure {
  width: min(100%, 1200px);
  max-width: 1200px;
  margin: 0;
}

.tactical-master.report-opening > .hero-section-content > .master-takeaways { margin: 0; }

/* Text and pitch are peers only inside an explicit analytical component. */
.structure-report { margin-top: 0; }
.structure-stage {
  padding: clamp(18px, 1.5cqi, 28px);
  border: 1px solid var(--border-subtle);
  border-top: 3px solid var(--brand-accent);
}

.structure-stage-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--report-gap);
  align-items: start;
}

.structure-stage-copy {
  width: 100%;
  max-width: none;
}

.structure-stage-copy p,
.component-copy p,
.chance-report-copy p {
  max-width: 76ch;
  font-size: var(--report-body-size);
  line-height: 1.65;
}

.structure-stage-layout > .pitch-figure {
  width: 100%;
  max-width: 1100px;
  margin: 0;
  justify-self: stretch;
}

@container tactical-component (min-width: 1040px) {
  .structure-stage-layout,
  .structure-stage-secondary .structure-stage-layout {
    grid-template-columns: minmax(34ch, .78fr) minmax(560px, 1.22fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "copy pitch"
      "detail pitch";
    gap: var(--report-gap);
  }
}

.component-label {
  display: block;
  margin: 0 0 14px;
  color: var(--text-muted);
  font-size: 10.5px;
  font-weight: 850;
  letter-spacing: .13em;
  line-height: 1.3;
  text-transform: uppercase;
}

.exit-report { display: grid; gap: clamp(30px, 3cqi, 46px); }
.exit-main {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--report-gap);
  align-items: start;
  margin: 0;
}

.exit-main > .component-copy,
.exit-main > .component-visual {
  width: 100%;
  min-width: 0;
  max-width: none;
}
.exit-main > .component-visual > .pitch-figure {
  width: 100%;
  max-width: 1040px;
  margin: 0;
}

@container report-section (min-width: 1080px) {
  .exit-main {
    grid-template-columns: minmax(34ch, 5fr) minmax(560px, 7fr);
    grid-template-rows: auto 1fr;
    grid-template-areas:
      "copy visual"
      "detail visual";
  }
  .exit-main > .component-copy { grid-area: copy; }
  .exit-main > .component-visual { grid-area: visual; }
  .exit-main > .external-pitch-readout { grid-area: detail; }
}

.exit-report > .sequence-comparison { margin-top: 0; }
.sequence-example > .pitch-figure { max-width: 760px; }

/* LEFT / CENTRE / RIGHT cards begin immediately after the section lead. */
.channel-stories {
  margin-top: 0;
  gap: var(--report-gap);
}

.channel-story { min-width: 0; }
.channel-story > header p,
.channel-field p { max-width: none; }

.channel-detail {
  margin-top: clamp(28px, 2.5cqi, 42px);
  padding: clamp(18px, 1.7cqi, 30px);
}

.channel-detail-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 5px;
  align-items: start;
  justify-content: start;
}

.channel-detail-head h4 { margin: 0; }
.channel-detail-tabs { margin-top: 16px; }
.channel-detail-summary p { max-width: 95ch; }

/* Universal fixed-viewport switcher. */
.tactical-view-switcher {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  width: 100%;
  min-width: 0;
}

.tactical-view-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}

.tactical-view-controls > span {
  color: var(--text-muted);
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.tactical-view-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0;
}

.tactical-view-tabs button {
  min-height: 40px;
  padding: 9px 16px;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-strong);
  font-size: 11px;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.tactical-view-tabs button + button { border-left: 0; }
.tactical-view-tabs button.active {
  color: var(--text-on-accent);
  background: var(--brand-accent);
  border-color: var(--brand-accent);
}

.tactical-view-viewport {
  display: grid;
  place-items: start center;
  width: 100%;
  padding: clamp(14px, 1.5cqi, 24px);
  background: var(--surface-raised);
  border: 1px solid var(--border-subtle);
}

.tactical-view-visual {
  width: min(100%, 900px);
  min-width: 0;
}

.tactical-view-visual > .pitch-figure {
  width: 100%;
  max-width: 900px;
  margin: 0;
}

.tactical-view-caption {
  width: min(100%, 900px);
  margin-inline: auto;
}

.tactical-example-caption { display: grid; gap: 6px; }
.tactical-example-caption code { color: var(--text-primary); font-family: var(--font-figure); }
.tactical-example-caption small { color: var(--text-muted); }
.tactical-example-caption details { margin-top: 6px; }
.tactical-example-caption summary { color: var(--text-secondary); cursor: pointer; font-size: 12.5px; font-weight: 800; }
.tactical-example-caption details p { max-width: 76ch; margin: 12px 0 0; }

@container report-section (min-width: 1080px) {
  .tactical-view-viewport { min-height: 740px; }
}

.channel-detail-pattern {
  grid-template-columns: repeat(2, minmax(34ch, 1fr));
  gap: var(--report-gap);
}

/* One shot-analysis object: toolbar, pitch/detail viewport, navigation. */
.chance-report-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 2.2cqi, 38px);
  margin-top: 0;
}

.chance-report-copy {
  width: 100%;
  max-width: none;
}

.chance-report-copy > p { max-width: 95ch; }
.report-shot-component {
  width: 100%;
  min-width: 0;
  container: report-shot / inline-size;
}

.report-shot-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 14px 24px;
  align-items: center;
  justify-content: start;
}

.report-shot-legend { justify-self: end; }
.report-interactive-shotmap .analysis-figure-shotmap { margin: 0; }
.report-interactive-shotmap .figure-pitch {
  width: 100%;
  max-width: none;
  margin: 0;
}

.report-interactive-shotmap .figure-shot-card,
.report-interactive-shotmap .figure-note {
  width: 100%;
  max-width: none;
  margin: 0;
}

.report-shot-navigation {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  min-height: 52px;
  padding: 10px 14px;
  background: var(--surface-sunken);
  border: 1px solid var(--border-subtle);
  border-top: 0;
}

.report-shot-navigation button {
  width: max-content;
  min-height: 34px;
  padding: 6px 10px;
  color: var(--text-primary);
  background: transparent;
  border: 1px solid var(--border-strong);
  font-size: 12px;
  font-weight: 750;
}
.report-shot-navigation button:last-child { justify-self: end; }
.report-shot-navigation span { color: var(--text-muted); font-size: 12px; font-variant-numeric: tabular-nums; }

@container report-shot (min-width: 700px) and (max-width: 1119px) {
  .report-interactive-shotmap .figure-shot-card {
    grid-template-columns: auto minmax(0, 1fr) minmax(280px, .85fr);
    align-items: start;
  }
  .report-interactive-shotmap .figure-shot-card dl { grid-column: 1 / 3; }
  .report-interactive-shotmap .figure-shot-card .figure-goal-view {
    grid-column: 3;
    grid-row: 1 / span 2;
    margin: 0;
  }
}

@container report-shot (min-width: 1120px) {
  .report-interactive-shotmap .analysis-figure-shotmap {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, .65fr);
    align-items: stretch;
  }
  .report-interactive-shotmap .analysis-figure-shotmap > .figure-pitch {
    grid-column: 1;
    grid-row: 1;
  }
  .report-interactive-shotmap .analysis-figure-shotmap > .figure-shot-card,
  .report-interactive-shotmap .analysis-figure-shotmap > .figure-note {
    grid-column: 2;
    grid-row: 1;
    align-content: start;
    border-top: 0;
    border-right: 0;
    border-bottom: 0;
  }
  .report-interactive-shotmap .figure-shot-card .figure-goal-view {
    grid-column: 1 / -1;
    margin-top: 14px;
  }
}

@container report-section (min-width: 1080px) {
  .report-shot-component {
    width: min(85%, 1625px);
    margin-inline: auto;
  }
}

/* Thun's structural map and its example are alternative views of one object. */
.opponent-report {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(24px, 2.4cqi, 40px);
}
.opponent-report > .tactical-view-switcher,
.opponent-report > .opponent-threats {
  grid-column: 1 / -1;
  grid-row: auto;
}
.opponent-threats {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1px;
  width: 100%;
}

@container report-section (min-width: 900px) {
  .opponent-threats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.mechanism-role-grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr));
}

/* Decorative regions and evidence overlays never intercept the actual node. */
.pitch-zone,
.pitch-cell,
.pitch-step,
.pitch-ring,
.pitch-detail,
.pitch-detail *,
.pitch-edge,
.pitch-annotation,
.shot-outcome-mark { pointer-events: none; }

@media (max-width: 799px) {
  .report-workspace .report-section > .section-lead { padding-bottom: 24px; }
  .tactical-master.report-opening h2 { font-size: clamp(38px, 12vw, 52px); }
  .hero-model { padding-block: 22px; }
  .channel-detail-tabs,
  .tactical-view-tabs { width: 100%; overflow-x: auto; flex-wrap: nowrap; }
  .tactical-view-tabs button { white-space: nowrap; }
  .tactical-view-viewport { min-height: 0; }
  .channel-detail-pattern { grid-template-columns: minmax(0, 1fr); }
  .report-shot-toolbar { grid-template-columns: minmax(0, 1fr); }
  .report-shot-legend { justify-self: start; }
  .report-shot-navigation button { font-size: 0; }
  .report-shot-navigation button:first-child::first-letter,
  .report-shot-navigation button:last-child::first-letter { font-size: 15px; }
}
