/* ==========================================================================
   Kindly Verify — shared stylesheet for the blog section
   One file. Every post links to it. Change it once, every post changes.

   Palette and fonts are inherited from /assets/css/site.css. The five custom
   properties below are aliases onto the site's own six colours, so the blog
   can never drift away from the printed-book palette.
   ========================================================================== */

:root {
  --ink:        #000000;  /* body text            — site --black   */
  --ink-soft:   #555555;  /* dates, credits, meta — site --grey    */
  --paper:      #FFFFFF;  /* page background      — site --white   */
  --accent:     #1A3A6B;  /* headings, rules      — site --navy    */
  --hairline:   #D8D2C4;  /* dividers             — cream, darkened */
  --flag:       #F47920;  /* nameplate rule       — site --saffron */
  --shade:      #FAF3E3;  /* nameplate ground     — site --cream   */

  --font-script: "Kalam", "Segoe Script", cursive;

  --measure:    46rem;    /* ~90 characters. Title, rule and text share this
                             width, so the block aligns on both edges. */
}

/* --- page shell ---------------------------------------------------------- */
/* Matches the site's own .wrap so the blog sits on the same 62rem grid as
   every other page, instead of floating in a column of its own width. */

.kv {
  color: var(--ink);
  background: var(--paper);
  font-family: Georgia, "Iowan Old Style", "Times New Roman", serif;
  font-size: 1.125rem;
  line-height: 1.7;
}

.kv__wrap {
  width: 100%;
  max-width: 62rem;
  margin-inline: auto;
  padding: 2.5rem 1.125rem 4rem;
}

/* Base link colour. Declared here, above the components, because the
   component rules below match at the same specificity and would otherwise
   lose to this one on source order alone. */
.kv a { color: var(--accent); text-underline-offset: 0.18em; }

/* --- nameplate ----------------------------------------------------------- */
/* The section is called Kindly Verify. That is a name, not an instruction,
   so it is set as a nameplate: an eyebrow that repeats the word the visitor
   clicked in the nav, the name itself, then a line saying what it is. A
   first-time reader should never have to guess. */

.kv__nameplate {
  background: var(--shade);
  border-top: 5px solid var(--flag);
  padding: 1.6rem 1.5rem 1.75rem;
  max-width: var(--measure);
  margin: 0 auto 3rem;
  text-align: center;
}

.kv__eyebrow {
  font-family: var(--font-head);
  font-weight: bold;
  font-size: 0.72rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--flag);
  margin: 0 0 0.5rem;
}

/* The name is set in Kalam, a pen-written face from the Indian Type Foundry,
   beside a small emblem: a ruled document under a lens, with a tick. The
   emblem is decorative and marked aria-hidden, so the h1 still reads simply
   as "Kindly Verify" to a screen reader. */

.kv__masthead {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  font-family: var(--font-script);
  color: var(--accent);
  font-size: clamp(2.3rem, 7vw, 3.6rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: 0;
  margin: 0 0 0.6rem;
}

/* Kalam sits high in its box; a hair of optical nudge re-centres the word
   against the emblem. */
.kv__masthead-word { display: block; padding-top: 0.12em; }

.kv__mark {
  flex: none;
  width: 1.15em;
  height: 1.15em;
  overflow: visible;
}

.kv__mark-page,
.kv__mark-lens { fill: var(--paper); }

.kv__mark-page,
.kv__mark-rule,
.kv__mark-tick { stroke: var(--accent); }

.kv__mark-lens,
.kv__mark-grip { stroke: var(--flag); }

.kv__mark-page  { stroke-width: 2.6; }
.kv__mark-rule  { stroke-width: 2.2; stroke-linecap: round; fill: none; }
.kv__mark-lens  { stroke-width: 3; }
.kv__mark-tick  { stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; fill: none; }
.kv__mark-grip  { stroke-width: 3.4; stroke-linecap: round; fill: none; }

/* On a narrow phone the pair stacks so neither has to shrink. */
@media (max-width: 24rem) {
  .kv__masthead { flex-direction: column; gap: 0.35rem; }
}

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

.kv__lede {
  font-size: 1.125rem;
  line-height: 1.65;
  color: var(--ink);
  max-width: var(--measure);
  margin: 0 auto 2.5rem;
}

/* --- a single post ------------------------------------------------------- */
/* One column. The title, the saffron rule beneath the byline, the body text
   and the illustration all share --measure, so every edge lines up. */

.kv__article {
  max-width: var(--measure);
  margin-inline: auto;
}

.kv__kicker {
  font-family: var(--font-script);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0;
  margin: 0 0 0.7rem;
}

.kv__kicker a {
  color: var(--accent);
  font-weight: bold;
  text-decoration: none;
  border-bottom: 2px solid var(--flag);
  padding-bottom: 2px;
}
.kv__kicker a:hover, .kv__kicker a:focus { color: var(--accent); border-color: var(--accent); }

.kv__title {
  font-family: var(--font-head);
  color: var(--accent);
  font-size: clamp(2rem, 5.4vw, 3rem);
  line-height: 1.08;
  font-weight: bold;
  letter-spacing: -0.015em;
  text-wrap: balance;
  margin: 0 0 0.4rem;
}

.kv__byline {
  font-family: var(--font-head);
  font-size: 1rem;
  color: var(--ink-soft);
  margin: 0 0 2rem;
  padding-bottom: 1.1rem;
  border-bottom: 5px solid var(--flag);
}

.kv__byline::before {
  content: "~";
  margin-right: 0.15em;
}

/* --- body ---------------------------------------------------------------- */

/* Body paragraphs only. A bare `.kv p` here would outrank every .kv__*
   class below it and silently reset their margins. */
.kv p:not([class]) { margin: 0 0 1.35em; }
.kv h2 { margin: 2.75rem 0 1rem; }

.kv .kv__title,
.kv h2 { font-family: var(--font-head); color: var(--accent); }

.kv h2 {
  font-size: 1.35rem;
  font-weight: bold;
  line-height: 1.3;
}

/* First paragraph after the title carries a little more weight, the way a
   standfirst does in print. */
.kv__article > .kv__byline + p { font-size: 1.2rem; line-height: 1.6; }

.kv blockquote {
  margin: 2rem 0;
  padding-left: 1.25rem;
  border-left: 3px solid var(--flag);
  font-style: italic;
  color: var(--ink-soft);
}

/* --- illustration -------------------------------------------------------- */

.kv__figure { margin: 2.75rem 0; }

.kv__figure img {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--hairline);
}

.kv__figure figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: var(--ink-soft);
}

/* --- the standard credit block ------------------------------------------- */
/* Same on every post, by anyone. This is the section's signature. */

.kv__credit {
  margin: 3rem 0 0;
  padding-top: 1.25rem;
  border-top: 3px solid var(--flag);
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.kv__credit a { color: inherit; }

.kv__sources {
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--hairline);
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--ink-soft);
  font-style: italic;
}

/* A post may set "Sources" as its own label paragraph above the list, as
   The Proof and the Warning does. The pair then shares the one rule. */
.kv__sources:has(+ .kv__sources) { margin-bottom: 0; }
.kv__sources + .kv__sources { margin-top: 0.3rem; padding-top: 0; border-top: 0; }

/* --- the thumbs-up ------------------------------------------------------- */
/* Ships disabled and silent. assets/js/react.js enables it, and the running
   total only appears for a moment after a press. A reader who does not press
   never sees a number, so a post with three votes never looks unloved. */

.kv__react {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 2.5rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--hairline);
}

.kv__react-ask {
  margin: 0;
  font-size: 0.95rem;
  color: var(--ink-soft);
}

.kv__react-btn {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  background: none;
  border: 2px solid var(--hairline);
  border-radius: 50%;
  color: var(--ink-soft);
  cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.kv__react-btn[disabled] { cursor: default; opacity: 0.55; }

.kv__react-btn:not([disabled]):hover,
.kv__react-btn:not([disabled]):focus-visible {
  color: var(--accent);
  border-color: var(--accent);
}

.kv__react-btn.is-pressed {
  color: var(--flag);
  border-color: var(--flag);
}

.kv__react-btn:not([disabled]):active { transform: scale(0.92); }

.kv__thumb { width: 1.4rem; height: 1.4rem; fill: currentColor; }

/* The total, shown only on a press. It is an <output>, so a screen reader is
   told the number without the focus moving. */
.kv__react-count {
  font-family: var(--font-head);
  font-weight: bold;
  font-size: 1.05rem;
  color: var(--flag);
  font-variant-numeric: tabular-nums;
  opacity: 0;
}

.kv__react-count.is-flashing { animation: kv-flash 2.2s ease-out 1; }

@keyframes kv-flash {
  0%   { opacity: 0; transform: translateY(0.4rem); }
  12%  { opacity: 1; transform: translateY(0); }
  70%  { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-0.3rem); }
}

@media (prefers-reduced-motion: reduce) {
  .kv__react-btn:not([disabled]):active { transform: none; }
  .kv__react-count.is-flashing { animation: kv-flash-plain 2.2s steps(1, end) 1; }
  @keyframes kv-flash-plain { 0%, 85% { opacity: 1; } 100% { opacity: 0; } }
}

/* --- index of posts ------------------------------------------------------ */

.kv__list {
  list-style: none;
  margin-inline: auto;
  padding: 0;
  max-width: var(--measure);
}

.kv__item {
  padding: 1.75rem 0;
  border-top: 1px solid var(--hairline);
}

.kv__item:last-child { border-bottom: 1px solid var(--hairline); }

.kv__item h2 {
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 0 0 0.4rem;
}

.kv__item h2 a { color: var(--accent); text-decoration: none; }
.kv__item h2 a:hover,
.kv__item h2 a:focus { color: var(--flag); text-decoration: underline; }

.kv__meta {
  font-family: var(--font-head);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.6rem;
}

.kv__standfirst { margin: 0; }

/* --- quality floor ------------------------------------------------------- */

.kv :focus-visible {
  outline: 2px solid var(--flag);
  outline-offset: 3px;
}
