/* PriceProof — stylesheet.
 *
 * Shares the design language of Data Today (the sibling site): white paper,
 * navy chrome, one blue link colour, and a three-typeface system — Source Serif
 * for headings, Source Sans for everything else, IBM Plex Mono for codes,
 * identifiers and evidence tags. The tokens below are deliberately the same
 * names and values, so the two sites read as one family.
 *
 * The structure: the chrome is Data Today's, and so is the newsroom, which runs
 * on the same serif body and mono metadata. What differs is the middle of a
 * product page — it is an evidence table and a chart, not an article, so the
 * measure widens for tables and every figure is set in tabular numerals.
 */

:root {
  /* Palette: white paper, navy chrome, one blue link colour */
  --paper: #ffffff;
  --paper-2: #f4f6f8;
  --ink: #05192d;
  --ink-soft: #213147;
  --ink-mute: #5d6a77;
  --line: #e4e2dc;
  --line-soft: #eeebe6;
  --accent: #05192d;
  --accent-ink: #0065d1;
  --link: #05192d;
  --card: #ffffff;
  --navy: #05192d;
  --navy-2: #0c2744;
  --chrome: #f7f5f2;

  /* Kept from the previous palette so nothing that referenced them breaks */
  --muted: var(--ink-mute);
  --bg: var(--paper);
  --bg-soft: var(--paper-2);
  --accent-soft: #e8f0fb;
  --warn: #8a5a00;

  /* Type: sans runs the site, serif runs the headings */
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  /* Rhythm */
  --maxw: 1240px;   /* chrome: masthead, nav, footer */
  --max: 52rem;     /* content measure: readable prose AND wide enough for tables */
  --gap: clamp(1rem, 2.4vw, 2rem);
  --radius: 4px;
  --shadow: 0 1px 2px rgba(17, 17, 17, 0.06), 0 8px 24px rgba(17, 17, 17, 0.05);

  --dur-1: 140ms;
  --dur-2: 240ms;
  --ease-soft: cubic-bezier(0.16, 1, 0.3, 1);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--link); text-decoration: none; border-bottom: 1px solid rgba(5, 25, 45, 0.22); }
a:hover { color: var(--accent-ink); border-bottom-color: currentColor; }

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.2;
  margin: 0;
  color: var(--ink);
  letter-spacing: -0.015em;
}

/* -- Announcement bar -----------------------------------------------------
 * Data Today's bar, for the same book: a single dismissible line above the
 * chrome. Same yellow, same navy text, because the two sites are one family and
 * a reader arriving from one should recognise the other. It sits outside <main>,
 * so it can never be mistaken for reporting — and never counts against the
 * shared-boilerplate rule, which reads the main element.
 */

.announce { background: #f4c542; color: var(--navy); }
.announce[hidden] { display: none; }
.announce__inner {
  width: min(100% - 2rem, var(--maxw)); margin-inline: auto;
  display: flex; align-items: center; gap: .8rem; min-height: 42px; padding: .4rem 0;
}
.announce__link {
  display: flex; align-items: center; gap: .7rem; flex: 1; min-width: 0;
  color: var(--navy); font-size: .92rem; font-weight: 600; line-height: 1.3;
  border-bottom: 0;
}
.announce__link:hover { text-decoration: none; border-bottom: 0; color: var(--navy); }
.announce__link:hover .announce__cta { text-decoration: underline; }
.announce__flag {
  flex: 0 0 auto; background: var(--navy); color: #fff; font-size: .68rem; font-weight: 800;
  letter-spacing: .04em; text-transform: uppercase; padding: .22rem .45rem; border-radius: 3px;
}
.announce__text { min-width: 0; }
.announce__text strong { font-weight: 800; }
.announce__cta { flex: 0 0 auto; margin-left: auto; font-weight: 800; white-space: nowrap; }
.announce__close {
  flex: 0 0 auto; display: grid; place-items: center; width: 28px; height: 28px;
  border: 0; border-radius: 4px; background: transparent; color: var(--navy); cursor: pointer;
}
.announce__close:hover { background: rgba(5, 25, 45, .1); }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 8px; top: 8px; z-index: 90;
  background: var(--paper); color: var(--ink);
  padding: 8px 12px; border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* -- Chrome: navy masthead, chrome subnav -------------------------------- */

.site-head { background: var(--navy); color: #fff; }
.site-head .bar {
  width: min(100% - 2rem, var(--maxw));
  margin-inline: auto;
  display: flex; align-items: center; gap: 1.2rem;
  padding: .8rem 0;
  flex-wrap: wrap;
}
.brand {
  font-family: var(--sans);
  font-size: 1.4rem; font-weight: 800; letter-spacing: -0.03em;
  color: #fff; border-bottom: 0; line-height: 1;
  display: inline-flex; align-items: baseline;
}
.brand:hover { color: #fff; border-bottom: 0; }
.brand .brand__proof { font-weight: 500; }
.site-head nav { margin-left: auto; display: flex; gap: .15rem; flex-wrap: wrap; }
.site-head nav a {
  color: rgba(255, 255, 255, .82); border-bottom: 0;
  font-weight: 600; font-size: .95rem;
  padding: .35rem .6rem; border-radius: var(--radius);
  transition: background var(--dur-2) var(--ease-soft), color var(--dur-2) var(--ease-soft);
}
.site-head nav a:hover { color: #fff; background: rgba(255, 255, 255, .1); border-bottom: 0; }
.site-head nav a[aria-current="page"] { color: #fff; font-weight: 800; }

.subnav { background: var(--chrome); border-bottom: 1px solid var(--line); }
.subnav ul {
  width: min(100% - 2rem, var(--maxw));
  margin: 0 auto; padding: .35rem 0;
  list-style: none; display: flex; gap: .2rem; align-items: center;
  overflow-x: auto; scrollbar-width: none;
}
.subnav ul::-webkit-scrollbar { display: none; }
.subnav a {
  font-weight: 600; font-size: .9rem; color: var(--ink-soft);
  white-space: nowrap; padding: .35rem .6rem; border-radius: var(--radius);
  border-bottom: 0;
}
.subnav a:hover { color: var(--ink); background: rgba(5, 25, 45, .06); border-bottom: 0; }
.subnav a[aria-current="page"] { color: var(--ink); font-weight: 800; background: #fff; }

/* -- Content ------------------------------------------------------------- */

main {
  display: block;
  max-width: var(--max);
  margin-inline: auto;
  padding: clamp(1.6rem, 3.5vw, 2.6rem) 1rem 3rem;
}

h1 { font-size: clamp(1.8rem, 1.2rem + 1.6vw, 2.4rem); margin: 0 0 .6rem; }
h2 { font-size: 1.35rem; margin: 2.4rem 0 .6rem; padding-top: .2rem; }
h3 { font-size: 1.08rem; margin: 1.6rem 0 .5rem; font-family: var(--sans); font-weight: 700; }
p { margin: 0 0 .95rem; }
ul, ol { padding-left: 1.25rem; }
li { margin-bottom: .35rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2rem 0; }
code, kbd, samp { font-family: var(--mono); font-size: .88em; }
blockquote {
  margin: 1.2rem 0; padding: .2rem 0 .2rem 1rem;
  border-left: 3px solid var(--line); color: var(--ink-soft);
}

.kicker {
  text-transform: uppercase; letter-spacing: .08em;
  font-family: var(--sans); font-weight: 700;
  font-size: .74rem; color: var(--ink-mute); margin: 0 0 .5rem;
}
.lede { font-size: 1.14rem; line-height: 1.5; color: var(--ink-soft); max-width: 60ch; }
.byline, .hero-meta, .meta-line { font-size: .9rem; color: var(--ink-mute); }
.byline { margin: 0 0 1.4rem; }
.muted { color: var(--ink-mute); }
.intro { color: var(--ink-soft); }

.note {
  font-size: .93rem; color: var(--ink-soft);
  background: var(--paper-2); border-left: 3px solid var(--line);
  padding: .8rem 1rem; margin: 1.2rem 0;
}
.caution {
  background: #fff8e6; border-left: 3px solid var(--warn);
  padding: .8rem 1rem; font-size: .95rem; margin: 1.2rem 0;
}
.hero { padding: .2rem 0 .4rem; border-bottom: 1px solid var(--line); margin-bottom: 1.6rem; }

/* -- The answer box -------------------------------------------------------
 * The first thing on a product page: what an agency typically paid, and in the
 * same breath what kind of number it is. The rule is the accent bar, not a
 * colour, so the box reads as a boxed answer rather than an alert.
 */

.answer {
  border: 1px solid var(--line); border-radius: var(--radius);
  border-left: 4px solid var(--navy);
  background: var(--chrome);
  padding: 1.1rem 1.25rem 1.2rem; margin: 0 0 1.8rem;
}
.answer-q {
  font-family: var(--sans); font-weight: 700; font-size: .8rem;
  text-transform: uppercase; letter-spacing: .07em;
  color: var(--ink-mute); margin: 0 0 .45rem;
}
.answer-a { margin: 0; font-family: var(--serif); line-height: 1.25; }
.answer-a strong { font-size: 1.72rem; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
.answer-n { display: block; font-family: var(--sans); font-size: .88rem; color: var(--ink-soft); margin-top: .3rem; }
.answer-range {
  font-family: var(--mono); font-size: .82rem; color: var(--ink-mute);
  margin: .6rem 0 0; font-variant-numeric: tabular-nums;
}
.answer-caveat { font-size: .87rem; color: var(--ink-soft); margin: .7rem 0 0; max-width: 68ch; }
.answer .lede { margin: .9rem 0 0; font-size: 1.05rem; }

/* -- Articles (the newsroom) --------------------------------------------- */

.article { max-width: 44rem; }
.article-head { border-bottom: 1px solid var(--line); padding-bottom: 1.1rem; margin-bottom: 1.6rem; }
.article-head h1 { margin: 0 0 .6rem; }
.dek { font-size: 1.14rem; line-height: 1.5; color: var(--ink-soft); margin: 0 0 .9rem; max-width: 60ch; }
.article-body { font-size: 1.04rem; line-height: 1.62; }
.article-body > p:first-child { font-size: 1.12rem; }
.article-body h2 { margin-top: 2rem; }
.article-body h3 { margin-top: 1.5rem; }
.article-body ul, .article-body ol { margin: 1rem 0; }
.article-body li { margin-bottom: .45rem; }
.article-body figure { margin: 1.6rem 0; }
.article-body table { width: 100%; margin: 1.4rem 0; }
.article-evidence {
  margin: 2.4rem 0 0; padding: 1rem 1.15rem;
  background: var(--paper-2); border-left: 3px solid var(--line);
}
.article-evidence h2 { margin: 0 0 .5rem; font-size: 1rem; text-transform: uppercase; letter-spacing: .06em; font-family: var(--sans); color: var(--ink-mute); }
.article-evidence p { font-size: .9rem; color: var(--ink-soft); margin: 0 0 .7rem; }
.article-evidence ul { margin: 0; padding-left: 1.1rem; font-size: .9rem; }
.article-foot { margin-top: 2.4rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: .88rem; color: var(--ink-mute); }
.plain { list-style: none; padding-left: 0; }

.article-list { list-style: none; padding: 0; margin: 1.2rem 0; }
.article-list li {
  display: grid; grid-template-columns: 8.5rem 1fr; gap: .2rem 1rem;
  padding: .85rem 0; border-bottom: 1px solid var(--line-soft);
}
.article-list time { font-family: var(--mono); font-size: .8rem; color: var(--ink-mute); }
.article-list a { font-weight: 600; }
.article-list .muted { grid-column: 2; font-size: .9rem; }
/* A lead spans the row. Left to the shared 3-column grid it took a third of the
   width and read as a stray card rather than the piece the section is leading on. */
.card--lead { border-left: 4px solid var(--navy); grid-column: 1 / -1; }
.card-meta { font-size: .84rem; color: var(--ink-mute); margin: .7rem 0 0; font-family: var(--mono); }

/* The disclosure box on a piece the desk wrote.
   It sits above the article, not below it: a reader is entitled to know how the
   piece was made before they read it, and a note after the last paragraph is a
   note most readers never reach. It is deliberately quiet — a boxed notice, not
   a banner — because the piece is still the main event. */
.deskbox {
  margin: 0 0 2rem; padding: .9rem 1.1rem;
  background: var(--paper-2); border: 1px solid var(--line);
  border-left: 3px solid var(--navy); border-radius: var(--radius);
}
.deskbox h2 {
  margin: 0 0 .45rem; font-size: .82rem; font-family: var(--sans);
  text-transform: uppercase; letter-spacing: .07em; color: var(--ink-mute);
}
.deskbox p { margin: 0 0 .5rem; font-size: .89rem; line-height: 1.55; color: var(--ink-soft); }
.deskbox p:last-child { margin-bottom: 0; }

/* The sources block at the end of a desk piece.
   The heading carries `class="sources-head"` and `id="sources"` from eleventy.config.js
   so the desk box can link to it. Without this rule the list renders as one more
   paragraph of prose, which is the opposite of the point: it is the audit trail. */
.sources-head { margin-top: 2.2rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.sources-head + ul, .article-body .sources {
  list-style: none; padding: 0; margin: 1rem 0 0; font-size: .89rem;
}
.sources-head + ul li, .article-body .sources li {
  padding: .5rem 0; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft);
}
.sources-head + ul li:last-child, .article-body .sources li:last-child { border-bottom: 0; }
.sources-head + ul a, .article-body .sources a { word-break: break-word; }

/* The desk tag in a listing: it has to be visible without being loud. The colours
   are set beside `.tag` itself (see "Lists of findings"), not here — `.tag` is
   declared later in this file at the same specificity, so a rule here would be
   overridden and the tag would render as an ordinary one. */
.article-list .tag--desk { grid-column: 2; justify-self: start; margin-bottom: .15rem; }

/* -- Cards --------------------------------------------------------------- */

/* Used as both a <div> (product grid) and a <ul> (newsroom cards). The list
   reset has to be explicit: a bare <ul> otherwise draws a disc marker and a
   40px indent, which put a bullet beside the lead card on the newsroom page. */
.cards { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-top: 1.2rem; list-style: none; padding: 0; }
.card {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1rem 1.15rem; background: var(--card);
  transition: box-shadow var(--dur-2) var(--ease-soft), transform var(--dur-2) var(--ease-soft);
}
.card:hover { box-shadow: var(--shadow); }
.card h3 { margin: 0 0 .4rem; font-size: 1.06rem; }
.card h3 a { border-bottom: 0; color: var(--ink); }
.card h3 a:hover { color: var(--accent-ink); }
.card-figures {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem; justify-content: space-between;
  margin: .1rem 0 .4rem; font-variant-numeric: tabular-nums;
  font-family: var(--mono); font-size: .84rem; color: var(--ink-soft);
}
.card-count { color: var(--ink-mute); font-size: .86rem; }
.card-vendor { font-size: .86rem; color: var(--ink-mute); margin: 0 0 .55rem; }
.card-lead { font-size: .93rem; color: var(--ink-soft); margin: 0; }

/* -- Newsroom cards ------------------------------------------------------- */

/* A desk piece is written from one product's award record, so its card shows
   that product's own chart instead of a stock picture: the image is the
   evidence. The chart is an <img> pointed at a standalone SVG emitted by
   src/cards.njk — the same chart the product page draws.

   Scaled to the card's width, not cropped to a fixed height: the chart's
   meaning is in its edges (the dollar axis on the left, the date range on the
   right), and `object-fit: cover` in a card-sized box cuts exactly those off.
   The width/height attributes on the element carry the 720:260 ratio, so the
   card reserves the right space before the image loads. */
.card--piece { padding: 0; display: flex; flex-direction: column; }
.card-thumb { display: block; border-bottom: 1px solid var(--line); background: var(--card); }
.card-thumb img { display: block; width: 100%; height: auto; }
.card--piece .card-body { padding: 1rem 1.15rem; display: flex; flex-direction: column; flex: 1; }
/* Pinned to the foot of the card so a short lead and a long one still line
   their dates up across the row. */
.card--piece .card-meta { margin-top: auto; }
.card-chart {
  font-size: .78rem; color: var(--ink-mute); font-family: var(--mono);
  margin: .45rem 0 0; padding-top: .45rem; border-top: 1px solid var(--line);
}

/* -- Figures ------------------------------------------------------------- */

.figures { display: grid; grid-template-columns: 1fr; gap: .85rem; margin: 1.2rem 0; }
.figure {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: .9rem 1rem; background: var(--card);
}
.figure-value {
  display: block; font-family: var(--serif);
  font-size: 1.5rem; font-weight: 700;
  font-variant-numeric: tabular-nums; letter-spacing: -0.02em;
}
.figure-value small { font-family: var(--sans); font-size: .78rem; font-weight: 400; color: var(--ink-mute); }
.figure-label { display: block; font-size: .85rem; color: var(--ink-soft); margin-top: .3rem; }
.figure-label em {
  color: var(--accent-ink); font-style: normal;
  font-family: var(--mono); font-size: .76rem;
}
.figure-meaning { font-size: .83rem; color: var(--ink-mute); margin: .55rem 0 0; }

.facts { margin: 1rem 0; }
.facts li { margin-bottom: .5rem; }

/* -- Chart --------------------------------------------------------------- */

.chart {
  margin: 1.2rem 0; border: 1px solid var(--line); border-radius: var(--radius);
  padding: .7rem .8rem; background: var(--paper-2);
}
/* The .pp-* rules live in chart.css, which base.njk links before this file. They
   are separate because the homepage's article cards load the same charts as
   standalone SVG files through <img>, where this stylesheet does not reach; the
   build inlines chart.css into each of those files. Moving the rules here would
   silently strip the colour out of every card image. */
.chart figcaption { font-size: .84rem; color: var(--ink-mute); margin-top: .55rem; }

/* -- Evidence table ------------------------------------------------------ */

.table-scroll { overflow-x: auto; margin: 1.2rem 0; }
table.evidence { border-collapse: collapse; width: 100%; font-size: .89rem; }
table.evidence caption {
  text-align: left; color: var(--ink-mute); font-size: .84rem; padding-bottom: .55rem;
}
table.evidence th, table.evidence td {
  border-bottom: 1px solid var(--line); padding: .6rem .65rem;
  text-align: left; vertical-align: top;
}
table.evidence thead th {
  background: var(--paper-2); font-family: var(--sans);
  font-size: .74rem; text-transform: uppercase; letter-spacing: .05em;
  color: var(--ink-soft); font-weight: 700; border-bottom-color: var(--line);
}
table.evidence tbody tr:hover { background: rgba(5, 25, 45, .025); }
table.evidence .num {
  text-align: right; font-family: var(--mono);
  font-variant-numeric: tabular-nums; white-space: nowrap;
}
table.evidence small { color: var(--ink-mute); font-size: .76rem; }

.tag {
  display: inline-block; background: var(--accent-soft); color: var(--navy-2);
  border-radius: 3px; padding: .1rem .4rem;
  font-family: var(--mono); font-size: .74rem; white-space: nowrap;
}
/* The scope label sits beside the evidence-type label and must not be mistaken
 * for it: the type says what kind of number the amount is, the scope says what
 * was bought. Muted, because it is the second-order fact of the two. */
.tag--scope { background: var(--paper-2); color: var(--ink-mute); border: 1px solid var(--line); }
/* The desk that wrote a piece, beside its title in a listing. Sans-serif and
 * heavier than a scope tag, because it is not a fact about the data — it is a
 * fact about who is speaking, and it has to survive a reader skimming. */
.tag--desk {
  background: var(--navy); color: var(--paper);
  font-family: var(--sans); font-weight: 600; letter-spacing: .01em;
}

/* -- Lists of findings --------------------------------------------------- */

.hidden, .history, .rejected { margin: 1rem 0; }
.hidden li { margin-bottom: .6rem; font-size: .92rem; }
.hidden q { color: var(--ink-soft); font-style: italic; }
.history li { margin-bottom: .45rem; font-size: .92rem; }
.history time { color: var(--ink-mute); font-family: var(--mono); font-size: .84rem; }
.rejected li { font-size: .92rem; color: var(--ink-soft); }

.faq { margin: 1rem 0; }
.faq dt { font-family: var(--sans); font-weight: 700; margin-top: 1.1rem; }
.faq dd { margin: .3rem 0 0; color: var(--ink-soft); }
.cite { display: block; font-size: .81rem; color: var(--ink-mute); margin-top: .3rem; }

/* -- Footer -------------------------------------------------------------- */

.site-foot { background: var(--navy); color: rgba(255, 255, 255, .78); margin-top: 3rem; }
.site-foot .bar {
  width: min(100% - 2rem, var(--maxw));
  margin-inline: auto;
  padding: clamp(2rem, 4vw, 3rem) 0 1.6rem;
}
.site-foot a { color: rgba(255, 255, 255, .78); border-bottom: 0; }
.site-foot a:hover { color: #fff; border-bottom: 0; text-decoration: underline; }
.foot-brand { display: flex; flex-direction: column; gap: .5rem; margin-bottom: 1.6rem; }
.foot-brand .brand { font-size: 1.15rem; }
.foot-note { color: rgba(255, 255, 255, .7); font-size: .92rem; max-width: 62ch; margin: 0; }
.foot-cols {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--gap); border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 1.4rem;
}
.foot-cols h3 {
  font-family: var(--sans); color: #fff; font-size: .82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; margin: 0 0 .6rem;
}
.foot-cols ul { list-style: none; margin: 0; padding: 0; }
.foot-cols li { padding: .18rem 0; font-size: .9rem; margin: 0; }
.foot-legal {
  border-top: 1px solid rgba(255, 255, 255, .16); margin-top: 1.4rem; padding-top: 1rem;
  font-size: .82rem; color: rgba(255, 255, 255, .6);
}

@media (min-width: 640px) {
  .cards { grid-template-columns: 1fr 1fr; }
  .figures { grid-template-columns: repeat(3, 1fr); }
}
@media (min-width: 1000px) {
  .cards { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 600px) {
  /* The bar drops its sentence on a phone and keeps the flag and the call to
     action, which is what Data Today does — one line, never a stack. */
  .announce__text { display: none; }
  .announce__cta { font-size: .82rem; }
  .announce__link { gap: .55rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition-duration: 1ms !important; }
}
