/* Contrastic site. Colours from docs/brand (dark page): navy #080C1F, cream #FBE6D8 (16.1:1),
   orange #FF710B (7.04:1). Muted text #C7B8B0 is 10.1:1 on navy. */
@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("/brand/PlusJakartaSans-wght.ttf") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --navy: #080c1f;
  --card: #121833;
  --cream: #fbe6d8;
  --muted: #c7b8b0;
  --orange: #ff710b;
  --line: #2e3350;
  --max: 68rem;
  color-scheme: dark;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--navy);
  color: var(--cream);
  font: 400 1.0625rem/1.6 "Plus Jakarta Sans", system-ui, sans-serif;
}

a { color: var(--orange); text-underline-offset: 0.2em; }
a:hover { color: var(--cream); }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 3px; border-radius: 2px; }

code, pre { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.92em; }

.skip {
  position: absolute; left: 1rem; top: -4rem; z-index: 10;
  background: var(--cream); color: var(--navy); padding: 0.6rem 1rem; font-weight: 700;
}
.skip:focus { top: 1rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.top {
  max-width: var(--max); margin: 0 auto; padding: 1.5rem 1.25rem;
  display: flex; flex-wrap: wrap; gap: 1rem 2rem; align-items: center; justify-content: space-between;
}
.brand img { display: block; height: 2.5rem; width: auto; }
.top ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; }
.top a:not(.brand) { color: var(--cream); text-decoration: none; font-weight: 600; padding: 0.5rem 0; display: inline-block; }
.top a:not(.brand):hover, .top a[aria-current] { color: var(--orange); text-decoration: underline; }

main, footer { max-width: var(--max); margin: 0 auto; padding: 0 1.25rem; }
section { padding: 4rem 0; border-top: 1px solid var(--line); }
section.hero { border-top: 0; padding-top: 2rem; }

h1, h2, h3 { line-height: 1.2; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); font-weight: 750; margin: 0 0 1.25rem; max-width: 22ch; }
h1 span { color: var(--orange); display: block; }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); font-weight: 700; margin: 0 0 1rem; }
h3 { font-size: 1.2rem; font-weight: 700; margin: 0 0 0.4rem; }
.lead { font-size: 1.25rem; max-width: 46rem; color: var(--cream); }
.intro, .note, figcaption { color: var(--muted); max-width: 46rem; }

.video { margin: 2.5rem 0 0; }
.video video { width: 100%; height: auto; display: block; background: #000; border-radius: 6px; }
.video figcaption { margin-top: 0.75rem; }

.cards, .flow { list-style: none; padding: 0; margin: 2rem 0; display: grid; gap: 1rem; }
.cards { grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); }
.flow { grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); counter-reset: step; }
.cards li, .flow li, .split > div, .layers > div {
  background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1.25rem;
}
.cards li { border-top: 4px solid var(--orange); }
.cards p, .flow p, .split p, .layers dd { margin: 0; color: var(--muted); }
.flow li { counter-increment: step; }
.flow li h3::before { content: counter(step) ". "; color: var(--orange); }
.flow .when { display: block; font-size: 0.85rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: var(--orange); margin-bottom: 0.35rem; }
.flow .planned { border-style: dashed; }
.flow .planned .when { color: var(--muted); }

.split { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(18rem, 100%), 1fr)); gap: 1rem; }

.finding { margin: 2rem 0; }
.finding pre {
  background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--orange);
  border-radius: 6px; padding: 1.25rem; overflow-x: auto; margin: 0 0 0.75rem; line-height: 1.5;
}
.finding b { color: var(--orange); }

.sub { margin-top: 2.5rem; font-size: 1.35rem; }
.layers { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem; margin: 1rem 0 1.5rem; }
.layers dt { font-weight: 700; font-size: 1.2rem; margin-bottom: 0.4rem; }
.layers dd { margin: 0; }

table { width: 100%; max-width: 40rem; border-collapse: collapse; margin: 1.5rem 0; }
th, td { text-align: left; padding: 0.7rem 0.5rem; border-bottom: 1px solid var(--line); }
thead th { color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.cell { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; }
.bar { display: inline-block; width: clamp(3rem, 18vw, 8rem); height: 0.6rem; background: linear-gradient(90deg, var(--orange) var(--p), var(--line) var(--p)); border-radius: 3px; }

.transcript { padding-bottom: 4rem; }
.scenes { padding: 0; list-style: none; display: grid; gap: 1rem; margin: 2rem 0; }
.scenes li { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1.25rem; }
.scenes .time { margin: 0 0 0.5rem; font-weight: 700; color: var(--orange); }
.scenes .scene { color: var(--muted); font-style: italic; }
.scenes blockquote { margin: 0.75rem 0; padding-left: 1rem; border-left: 3px solid var(--orange); }
.scenes blockquote p, .scenes .en { margin: 0; }

footer { padding: 2rem 1.25rem 3rem; border-top: 1px solid var(--line); color: var(--muted); }

/* Graphics from the presentation deck (#511). The icons are the line icons of the deck:
   decoration only, aria-hidden, the text next to each one carries the meaning. */
.ic { width: 1.75rem; height: 1.75rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icards > li > .ic, .icard > .ic { display: block; color: var(--orange); margin-bottom: 0.75rem; }
.icards > li.planned > .ic { color: var(--muted); }
.split .icard { background: var(--card); border: 1px solid var(--line); border-radius: 6px; padding: 1.25rem; }

/* 1 in 6 */
.people { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; margin: 0 0 2rem; }
.people-icons { display: flex; gap: 0.35rem; }
.people-icons .ic { width: 3rem; height: 3rem; color: var(--line); stroke-width: 2.4; }
.people-icons .ic.hot { color: var(--orange); }
.people p { margin: 0; max-width: 34rem; color: var(--muted); }
.people b { display: block; font-size: 2.25rem; line-height: 1.1; color: var(--orange); }

/* Arrow tiles. Outer .stage = edge colour (orange on the Contrastic tiles), inner .tin = the tile.
   Each tile has the colour of one logo stripe on its top edge; --tile is that colour mixed with the
   card colour. Cream text on each tile is at least 9.9:1. */
.chev { --d: 1.4rem; margin: 2rem 0 0.5rem; }
.chev-row { list-style: none; margin: 0; padding: 0; display: flex; }
.chev .stage { flex: 1; min-width: 0; position: relative; display: flex; flex-direction: column; align-items: center; }
.chev .stage + .stage { margin-left: calc(var(--d) * -1 + 0.3rem); }
.chev .tin {
  align-self: stretch; min-height: 9.5rem; display: flex; flex-direction: column; color: var(--cream);
  background: linear-gradient(var(--tone) 0 0) top / 100% 0.3rem no-repeat, var(--tile);
  padding: 0.3rem calc(var(--d) + 0.25rem) 0;
  clip-path: polygon(0 0, calc(100% - var(--d)) 0, 100% 50%, calc(100% - var(--d)) 100%, 0 100%, var(--d) 50%);
}
.chev .stage:first-child .tin { clip-path: polygon(0 0, calc(100% - var(--d)) 0, 100% 50%, calc(100% - var(--d)) 100%, 0 100%); padding-left: 0.75rem; }
.chev .part { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 0.35rem; text-align: center; font-weight: 600; font-size: 0.95rem; line-height: 1.2; }
.chev .duo .part { font-size: 0.85rem; gap: 0.2rem; }
.chev .duo .part + .part { border-top: 1px solid rgba(251, 230, 216, 0.14); }
.chev .part .ic { color: var(--cream); width: 1.6rem; height: 1.6rem; }
.chev .duo .part .ic { width: 1.3rem; height: 1.3rem; }
.chev .hot .part .ic { color: var(--orange); }
.chev .part small { font-weight: 400; font-size: 0.78rem; color: var(--muted); }
.chev .pill {
  margin-top: -0.85rem; position: relative; z-index: 1; padding: 0.15rem 0.6rem; border-radius: 999px;
  background: var(--navy); border: 1px solid var(--line); color: var(--muted); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.08em; white-space: nowrap;
}
.chev .pill.word { letter-spacing: 0.02em; font-weight: 600; }
.chev .hot .pill { border-color: var(--orange); color: var(--orange); }

/* The pipeline: marker lines under the tiles, as a 6-column grid that matches the tiles. */
.markers { display: grid; grid-template-columns: repeat(6, 1fr); margin-top: 0.75rem; font-weight: 600; font-size: 0.9rem; }
.marker { display: flex; align-items: center; justify-content: center; gap: 0.4rem; padding-top: 0.4rem; border-top: 2px solid; text-align: center; }
.marker .ic { width: 1.1rem; height: 1.1rem; }
.marker.shift { grid-column: 2 / 4; color: var(--orange); }
.marker.now { grid-column: 6 / 7; color: var(--muted); }
.axis { display: flex; justify-content: space-between; margin: 0.75rem 0 0; font-size: 0.85rem; }
.ax-l { color: var(--orange); font-weight: 600; }
.ax-r { color: var(--muted); }

/* The five places point left: the arrow tip is on the left side. */
.places .tin { clip-path: polygon(var(--d) 0, 100% 0, calc(100% - var(--d)) 50%, 100% 100%, var(--d) 100%, 0 50%); }
.places .stage:first-child .tin { clip-path: polygon(var(--d) 0, 100% 0, calc(100% - var(--d)) 50%, 100% 100%, var(--d) 100%, 0 50%); padding-left: calc(var(--d) + 0.25rem); }
.places .stage:last-child .tin { clip-path: polygon(var(--d) 0, 100% 0, 100% 100%, var(--d) 100%, 0 50%); padding-right: 0.75rem; }
.places-text { margin-top: 1.5rem; }

/* Feedback: the finding next to three properties. */
.fb > * { min-width: 0; }
.fb { display: grid; grid-template-columns: minmax(0, 3fr) minmax(14rem, 2fr); gap: 1.5rem; align-items: start; margin: 2rem 0; }
.fb .finding { margin: 0; }
.props { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
.props li { display: flex; gap: 0.85rem; align-items: flex-start; }
.props .ic { color: var(--orange); margin-top: 0.15rem; }
.props b { display: block; font-size: 1.1rem; }
.props span { color: var(--muted); }

/* Number cards and the false-positive chart. */
.kpis { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); }
.kpi { display: block; font-size: 2.5rem; font-weight: 750; line-height: 1.05; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; margin-bottom: 0.35rem; }
.kpis .kpi + p { color: var(--muted); }
.tchart { margin: 1rem 0 0; max-width: 46rem; }
.tchart table { max-width: none; margin: 0 0 0.75rem; }
.tchart th { font-weight: 600; white-space: nowrap; width: 1%; padding-right: 1.25rem; }
.tchart th .ic { width: 1.2rem; height: 1.2rem; color: var(--orange); vertical-align: -0.2rem; margin-right: 0.5rem; }
.tchart .cell { flex-wrap: nowrap; gap: 0.75rem; }
.track { position: relative; flex: 1; height: 1.1rem; background: var(--card); border: 1px solid var(--line); border-radius: 3px; }
.fill { position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--orange); border-radius: 2px; }
.fill.dim { background: var(--cream); }
.goal { position: absolute; top: -0.35rem; bottom: -0.35rem; left: 66.7%; border-left: 2px dashed var(--cream); }
.value { font-weight: 700; font-variant-numeric: tabular-nums; min-width: 3.5rem; text-align: right; }

/* Narrow screens: the arrow tiles become a column of flat tiles, the pills sit on the right. */
@media (max-width: 52rem) {
  .chev-row { flex-direction: column; gap: 0.5rem; }
  .chev .stage { align-items: stretch; }
  .chev .stage + .stage { margin-left: 0; }
  .chev .tin, .chev .stage:first-child .tin, .places .tin, .places .stage:first-child .tin, .places .stage:last-child .tin {
    clip-path: none; min-height: 0; flex: 1; padding: 0.3rem 0.75rem 0; border-radius: 4px;
    background: linear-gradient(var(--tone) 0 0) left / 0.3rem 100% no-repeat, var(--tile);
  }
  .chev .part { flex-direction: row; justify-content: flex-start; gap: 0.6rem; padding: 0.6rem 0 0.6rem 0.5rem; text-align: left; flex-wrap: wrap; }
  .chev .duo .tin { flex-direction: row; }
  .chev .duo .part + .part { border-top: 0; border-left: 1px solid rgba(251, 230, 216, 0.14); }
  .chev .part small { flex-basis: 100%; padding-left: 2.2rem; }
  .chev .pill { margin: -0.7rem 0 0 0.9rem; align-self: flex-start; }
  .markers { display: flex; flex-direction: column; gap: 0.5rem; }
  .marker { justify-content: flex-start; border-top: 0; border-left: 2px solid; padding: 0 0 0 0.6rem; }
  .fb { grid-template-columns: 1fr; }
}

/* Phones (#511): a compact header, smaller graphics, less space between the sections. */
@media (max-width: 40rem) {
  .top { padding: 1rem 1.25rem 0.5rem; gap: 0.5rem; }
  .brand img { height: 2rem; }
  .top ul { gap: 0 1rem; }
  .top a:not(.brand) { font-size: 0.9rem; padding: 0.35rem 0; }
  section { padding: 2.5rem 0; }
  section.hero { padding-top: 1rem; }
  .lead { font-size: 1.1rem; }
  .people-icons { gap: 0.2rem; }
  .people-icons .ic { width: 2.25rem; height: 2.25rem; }
  .people b { font-size: 1.9rem; }
  .kpi { font-size: 2rem; }
  .tchart th { white-space: normal; width: auto; padding-right: 0.5rem; }
  .finding pre { white-space: pre-wrap; overflow-wrap: anywhere; }
}
