/* Second Line — shared stylesheet
   Design language: Swiss International Typographic Style.
   Grid-driven, left-aligned, hairline rules instead of shadows,
   one restrained red used only where it earns its place. */

:root {
  --bg: #faf9f6;
  --ink: #1a1a1a;
  --grey: #6b6b6b;
  --line: #dcdad3;
  --red: #d8232a;
  --max: 920px;
  --gutter: 24px;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }
a:hover { color: var(--red); }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.wrap {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ---------- Header ---------- */

.site-header {
  border-bottom: 1px solid var(--line);
  padding: 28px 0 20px;
}

.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

/* Wordmark: three stacked rules, the second one red.
   The mark is the three lines of defence; the red one is where we write from. */

.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  font-weight: 700;
  font-size: 20px;
  letter-spacing: 0.01em;
  text-decoration: none;
  color: var(--ink);
}

.wordmark svg { display: block; flex: none; }

.wordmark svg line {
  stroke: var(--ink);
  stroke-width: 2;
}

.wordmark svg line.second { stroke: var(--red); }

.wordmark:hover { color: var(--ink); }

nav.primary { display: flex; gap: 22px; flex-wrap: wrap; }

nav.primary a {
  font-size: 14px;
  text-decoration: none;
  color: var(--grey);
  letter-spacing: 0.02em;
}

nav.primary a:hover { color: var(--red); }

nav.primary a.active {
  color: var(--ink);
  border-bottom: 2px solid var(--red);
  padding-bottom: 2px;
}

/* ---------- Hero / intro ---------- */

.intro {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
}

.intro .kicker {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--red);
  margin: 0 0 14px;
}

.intro h1 {
  font-size: clamp(28px, 4.4vw, 42px);
  line-height: 1.12;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  max-width: 16ch;
}

.intro p.lede {
  font-size: 18px;
  color: var(--grey);
  max-width: 60ch;
  margin: 0;
}

/* ---------- Post list ---------- */

.post-list { padding: 40px 0 64px; }

.post-list h2.section-label,
section h2.section-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--grey);
  border-bottom: 1px solid var(--line);
  padding-bottom: 10px;
  margin: 0 0 8px;
}

.post-row {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 24px;
  padding: 28px 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
}

.post-row:hover .post-title { color: var(--red); }

.post-row .meta {
  font-size: 13px;
  color: var(--grey);
}

.post-row .meta .reviewed {
  display: block;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.post-row .tag {
  display: inline-block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--red);
  margin-bottom: 6px;
}

.post-title {
  font-size: 21px;
  font-weight: 700;
  margin: 0 0 8px;
  line-height: 1.3;
}

.post-dek {
  color: var(--grey);
  font-size: 15px;
  margin: 0;
  max-width: 62ch;
}

/* ---------- Article ---------- */

article.post { padding: 48px 0 80px; }

.post-header { margin-bottom: 40px; }

.post-header .tag {
  display: inline-block;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--red);
  margin-bottom: 12px;
}

.post-header h1 {
  font-size: clamp(26px, 4vw, 38px);
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
}

.post-header .byline {
  font-size: 13px;
  color: var(--grey);
  border-top: 1px solid var(--line);
  padding-top: 12px;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0;
}

.standfirst {
  font-size: 19px;
  font-weight: 500;
  line-height: 1.5;
  padding: 22px 24px;
  border-left: 3px solid var(--red);
  background: #fff;
  margin: 0 0 44px;
}

.post-body h2 {
  font-size: 22px;
  font-weight: 700;
  margin: 44px 0 14px;
  letter-spacing: -0.005em;
}

.post-body p {
  margin: 0 0 18px;
  max-width: 66ch;
}

.post-body p.grey { color: var(--grey); }

.post-body i { font-style: italic; }

/* Checklist — the signature element */

.checklist {
  border: 1px solid var(--ink);
  margin: 32px 0 40px;
  position: relative;
}

.checklist .checklist-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--ink);
  padding: 12px 18px;
}

.checklist .checklist-head span {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.checklist .checklist-head .status {
  color: var(--red);
}

.checklist ol {
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: item;
}

.checklist li {
  counter-increment: item;
  display: grid;
  grid-template-columns: 44px 1fr;
  border-bottom: 1px solid var(--line);
  padding: 16px 18px;
}

.checklist li:last-child { border-bottom: none; }

.checklist li::before {
  content: counter(item, decimal-leading-zero);
  font-weight: 700;
  color: var(--red);
  font-size: 15px;
}

.checklist li p {
  margin: 0;
  font-size: 15.5px;
}

/* Pitfall callout */

.pitfall {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 22px 0;
  margin: 40px 0;
}

.pitfall .label {
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--grey);
  margin: 0 0 10px;
}

.closing {
  margin-top: 44px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 15.5px;
  color: var(--grey);
}

/* Sources note — what the piece was checked against */

.post-body p.sources {
  margin-top: 32px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 13px;
  line-height: 1.5;
  color: var(--grey);
  max-width: 66ch;
}

/* ---------- About page ---------- */

.about-intro {
  padding: 0 0 4px;
  border-bottom: none;
}

.about-intro h1 { max-width: 22ch; }

.about-content { padding-top: 36px; }

.about-body p { max-width: 66ch; margin: 0 0 18px; }

.about-body h2 { font-size: 20px; margin: 36px 0 12px; }

.about-body p.grey { color: var(--grey); }

.creds {
  list-style: none;
  padding: 0;
  margin: 0 0 24px;
  border-top: 1px solid var(--line);
}

.creds li {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  font-size: 15px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.creds li span.label { color: var(--grey); font-size: 13px; }

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

.site-footer {
  border-top: 1px solid var(--line);
  padding: 32px 0 48px;
  font-size: 13px;
  color: var(--grey);
}

.site-footer .wrap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}

/* ---------- Motion & accessibility ---------- */

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

@media (max-width: 640px) {
  .post-row { grid-template-columns: 1fr; gap: 6px; }
  .post-row .meta .reviewed {
    display: inline;
    margin-top: 0;
    padding-top: 0;
    border-top: none;
  }
  .post-row .meta .reviewed::before { content: " · "; }
  .standfirst { padding: 18px; font-size: 17px; }
}
