/* No Man's Land — Rail
   White ground, black text, one red. Instrument Serif for display, Karla for everything else. */

:root {
  --paper: #ffffff;
  --ink: #0a0a0a;
  --body: #494949;
  --meta: #5f5f5f;
  --rule: #dcdcdc;
  --red: #e10600;

  --measure: 34rem;
  --rail: 6rem;
  --gap: 2.25rem;
  --edge: 1.5rem;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Karla, "Helvetica Neue", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.shell {
  max-width: calc(var(--rail) + var(--gap) + var(--measure));
  margin: 0 auto;
  padding: 0 var(--edge);
}

/* ---------- masthead ---------- */

.masthead {
  padding: 2.75rem 0 0;
}

.masthead__top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.brand {
  display: flex;
  align-items: center;
  gap: 1.1rem;
  text-decoration: none;
  color: var(--ink);
}

.brand__mark {
  display: block;
  width: 2.75rem;
  height: auto;
  flex-shrink: 0;
}

.brand__name {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.125rem, 7vw, 3.25rem);
  line-height: 1;
  letter-spacing: -0.015em;
}

.tagline {
  max-width: 27rem;
  margin: 1.1rem 0 0;
  color: var(--meta);
  font-size: 1rem;
  line-height: 1.55;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.35rem;
  font-size: 0.9375rem;
  font-weight: 500;
}

.nav a {
  color: var(--ink);
  text-decoration: none;
  padding: 0.4rem 0;
}

.nav a:hover,
.nav a:focus-visible {
  color: var(--red);
}

.nav a[aria-current="page"] {
  color: var(--red);
  font-weight: 600;
}

.masthead__rule {
  height: 2px;
  background: var(--ink);
  margin-top: 1.5rem;
}

/* ---------- the rail grid ---------- */

.rows {
  padding-top: 2.5rem;
}

.row {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, var(--measure));
  column-gap: var(--gap);
}

.row > .rail {
  grid-column: 1;
  padding-top: 0.45rem;
}

.row > .body {
  grid-column: 2;
  min-width: 0;
}

.rail__date {
  display: block;
  color: var(--red);
  font-weight: 700;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.rail__who {
  display: block;
  margin-top: 0.15rem;
  color: var(--meta);
  font-size: 0.8125rem;
}

@media (max-width: 44rem) {
  .row {
    grid-template-columns: minmax(0, 1fr);
  }
  .row > .rail,
  .row > .body {
    grid-column: 1;
  }
  .row > .rail {
    padding-top: 0;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
  }
  .rail__who {
    margin-top: 0;
  }
}

/* ---------- entry list ---------- */

.entry + .entry,
.entry-sep + .entry {
  margin-top: 0;
}

.entry .body {
  padding-bottom: 2rem;
}

.entry-sep {
  height: 1px;
  background: var(--rule);
  margin-bottom: 2rem;
}

.entry__title {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(1.75rem, 5vw, 2.375rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

.entry__title a {
  color: var(--ink);
  text-decoration: none;
}

.entry__title a:hover,
.entry__title a:focus-visible {
  color: var(--red);
}

.entry__standfirst {
  margin: 0.6rem 0 0;
  color: var(--body);
  font-size: 1rem;
}

/* ---------- article ---------- */

.article__title {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: clamp(2.125rem, 6.5vw, 3rem);
  line-height: 1.05;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.article__standfirst {
  margin: 0.9rem 0 0;
  font-size: 1.1875rem;
  line-height: 1.5;
  color: var(--body);
}

.article__meta {
  margin: 1.2rem 0 0;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9375rem;
  color: var(--meta);
}

.prose {
  padding-top: 1.75rem;
}

.prose > * + * {
  margin-top: 1.1em;
}

.prose > :first-child {
  margin-top: 0;
}

.prose h2 {
  margin-top: 2.5rem;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 1.75rem;
  line-height: 1.15;
}

.prose h3 {
  margin-top: 2rem;
  font-size: 1.0625rem;
  font-weight: 700;
}

.prose a {
  color: var(--red);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.prose a:hover {
  text-decoration-thickness: 2px;
}

.prose strong,
.prose b {
  font-weight: 700;
}

.prose blockquote {
  margin: 1.9rem 0;
  padding-left: 1.2rem;
  border-left: 3px solid var(--red);
  font-family: "Instrument Serif", Georgia, serif;
  font-size: 1.375rem;
  line-height: 1.35;
  color: var(--ink);
}

.prose blockquote p {
  margin: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.2rem;
}

.prose li + li {
  margin-top: 0.35rem;
}

.prose li::marker {
  color: var(--red);
}

.prose img {
  max-width: 100%;
  height: auto;
  display: block;
}

.prose figcaption {
  margin-top: 0.5rem;
  font-size: 0.875rem;
  color: var(--meta);
}

.prose code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  background: #f4f4f4;
  padding: 0.1em 0.3em;
}

.prose pre {
  background: #f4f4f4;
  border-left: 3px solid var(--ink);
  padding: 1rem;
  overflow-x: auto;
}

.prose pre code {
  background: none;
  padding: 0;
}

.prose hr {
  margin: 2.5rem 0;
  border: 0;
  border-top: 1px solid var(--rule);
}

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9375rem;
}

.prose th,
.prose td {
  text-align: left;
  padding: 0.5rem 0.6rem 0.5rem 0;
  border-bottom: 1px solid var(--rule);
}

.article__foot {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 2px solid var(--ink);
  font-size: 0.9375rem;
  color: var(--meta);
}

.article__foot b {
  color: var(--ink);
}

.article__foot a {
  color: var(--red);
}

/* ---------- archive ---------- */

.archive-year {
  margin: 0;
  font-family: "Instrument Serif", Georgia, serif;
  font-weight: 400;
  font-size: 1.75rem;
  color: var(--meta);
  font-variant-numeric: tabular-nums;
}

.archive-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.archive-list li {
  display: flex;
  gap: 1rem;
  align-items: baseline;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--rule);
}

.archive-list time {
  flex: 0 0 3.5rem;
  color: var(--red);
  font-weight: 700;
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
}

.archive-list a {
  color: var(--ink);
  text-decoration: none;
}

.archive-list a:hover {
  color: var(--red);
}

.archive-list small {
  display: block;
  color: var(--meta);
  font-size: 0.8125rem;
}

/* ---------- footer ---------- */

.foot {
  margin-top: 4rem;
  padding: 1rem 0 4rem;
  border-top: 2px solid var(--ink);
  color: var(--meta);
  font-size: 0.9375rem;
}

.foot p {
  margin: 0 0 0.3rem;
}

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

/* ---------- utilities ---------- */

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

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1rem;
  top: 1rem;
  z-index: 10;
  background: var(--paper);
  padding: 0.6rem 0.9rem;
  border: 2px solid var(--ink);
}

/* ---------- draft marker (review site only) ---------- */

.draft-flag {
  margin: 0 0 0.9rem;
  display: inline-block;
  background: var(--red);
  color: #ffffff;
  font-size: 0.8125rem;
  font-weight: 700;
  padding: 0.25rem 0.5rem;
}
