/* redact ai — a black-and-white paper. Ink on paper, one rule: no colour.
   Headlines are set in a serif, everything around them in a grotesque, and
   photographs run desaturated so a screenshot never breaks the palette. */

:root {
  --ink: #000;
  --paper: #fff;
  --ink-60: #4a4a4a;
  --ink-40: #767676;
  --ink-15: #d6d6d6;
  --ink-08: #ebebeb;
  --serif: Georgia, 'Times New Roman', Times, serif;
  --sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, Roboto, Arial, sans-serif;
  --measure: 1180px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

img {
  display: block;
  max-width: 100%;
  /* One palette, photographs included. */
  filter: grayscale(1) contrast(1.03);
}

a {
  color: inherit;
}

/* ── masthead ───────────────────────────────────────────────────────── */

.masthead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  padding: 18px clamp(16px, 4vw, 48px);
  background: var(--ink);
  color: var(--paper);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.brand-mark {
  width: 44px;
  height: 44px;
  filter: none;
}

.brand-name {
  font-family: var(--serif);
  font-size: clamp(24px, 3.4vw, 34px);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1;
}

.brand-thin {
  font-weight: 400;
  font-style: italic;
}

.masthead-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #c8c8c8;
}

.masthead-meta .rule {
  padding-right: 16px;
  border-right: 1px solid #4a4a4a;
}

/* ── layout ─────────────────────────────────────────────────────────── */

main {
  flex: 1;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto;
  padding: clamp(24px, 4vw, 44px) clamp(16px, 4vw, 48px) 64px;
}

.loading,
.failure {
  padding: 60px 0;
  color: var(--ink-40);
  font-size: 15px;
  text-align: center;
}

/* ── lead story ─────────────────────────────────────────────────────── */

.lead {
  display: grid;
  gap: clamp(18px, 3vw, 34px);
  padding-bottom: clamp(24px, 3.4vw, 40px);
  border-bottom: 3px double var(--ink);
}

@media (min-width: 860px) {
  .lead.has-image {
    grid-template-columns: 1.15fr 1fr;
    align-items: start;
  }
}

.lead-figure {
  overflow: hidden;
  background: var(--ink-08);
  aspect-ratio: 16 / 10;
}

.lead-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.lead-headline {
  font-family: var(--serif);
  font-size: clamp(30px, 5vw, 52px);
  font-weight: 700;
  line-height: 1.06;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.lead-headline a {
  text-decoration: none;
}

.lead-headline a:hover {
  text-decoration: underline;
  text-underline-offset: 5px;
}

.lead-standfirst {
  margin-top: 14px;
  font-size: clamp(16px, 1.6vw, 19px);
  line-height: 1.5;
  color: var(--ink-60);
}

/* ── the rest of the front page ─────────────────────────────────────── */

.section-rule {
  margin: 34px 0 18px;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-40);
}

.stories {
  display: grid;
  gap: 0;
}

.story {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  padding: 22px 0;
  border-bottom: 1px solid var(--ink-15);
}

@media (min-width: 700px) {
  .story.has-image {
    grid-template-columns: 1fr 200px;
  }
}

.story-headline {
  font-family: var(--serif);
  font-size: clamp(20px, 2.2vw, 25px);
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.015em;
}

.story-headline a {
  text-decoration: none;
}

.story-headline a:hover {
  text-decoration: underline;
  text-underline-offset: 4px;
}

.story-standfirst {
  margin-top: 8px;
  color: var(--ink-60);
  font-size: 15px;
}

.story-figure {
  overflow: hidden;
  background: var(--ink-08);
  aspect-ratio: 4 / 3;
}

.story-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.kicker {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-40);
}

.kicker .dot {
  width: 3px;
  height: 3px;
  background: currentColor;
  border-radius: 50%;
}

/* ── article ────────────────────────────────────────────────────────── */

.back {
  display: inline-block;
  margin-bottom: 26px;
  font-size: 12px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-40);
  text-decoration: none;
}

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

.article {
  max-width: 760px;
  margin: 0 auto;
}

.article-headline {
  font-family: var(--serif);
  font-size: clamp(28px, 4.4vw, 46px);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.025em;
  text-wrap: balance;
}

.article-standfirst {
  margin-top: 16px;
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.5;
  color: var(--ink-60);
}

.article-figure {
  margin: 28px 0;
  background: var(--ink-08);
}

.article-figure img {
  width: 100%;
}

.article-figure + .article-figure {
  margin-top: -16px;
}

.article-body {
  margin-top: 26px;
  font-size: 17px;
  line-height: 1.65;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.article-body a {
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

.article-body code,
.article-body pre {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 15px;
  background: var(--ink-08);
}

.article-body code {
  padding: 1px 5px;
}

.article-body pre {
  display: block;
  padding: 12px 14px;
  margin: 14px 0;
  overflow-x: auto;
  white-space: pre;
}

.article-body blockquote {
  margin: 16px 0;
  padding-left: 16px;
  border-left: 3px solid var(--ink);
  color: var(--ink-60);
}

.tg-spoiler {
  background: var(--ink);
  color: transparent;
  cursor: pointer;
}

.tg-spoiler.revealed {
  background: none;
  color: inherit;
  cursor: auto;
}

.article-foot {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--ink-15);
  font-size: 14px;
  color: var(--ink-40);
}

.article-foot a {
  color: var(--ink);
}

.card-preview {
  display: inline-block;
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid var(--ink-15);
  text-decoration: none;
  max-width: 100%;
}

.card-preview .site {
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-40);
}

.card-preview .title {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 18px;
  font-weight: 700;
}

/* ── footer ─────────────────────────────────────────────────────────── */

.footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(16px, 4vw, 48px);
  border-top: 1px solid var(--ink-15);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-40);
}

.footer a {
  color: var(--ink);
}
