/* Urban Progress archive
   One stylesheet, no build step. Colours and type follow chrisspoke.com. */

@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/dmsans-normal-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/dmsans-normal-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "DM Sans";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/dmsans-italic-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "DM Sans";
  font-style: italic;
  font-weight: 400 700;
  font-display: swap;
  src: url("fonts/dmsans-italic-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: light;
  --ink: #1b1b1b;
  --muted: #5f5a53;
  --paper: #f6f3ee;
  --accent: #2c5c6a;
  --accent-line: rgba(44, 92, 106, 0.4);
  --rule: rgba(27, 27, 27, 0.16);
  --measure: 40rem;
  --wide: 48rem;
  --gutter: 1.5rem;
}

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

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

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: "DM Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 18px;
  font-weight: 400;
  line-height: 1.65;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
}

a {
  color: var(--accent);
  text-decoration: none;
  border-bottom: 1px solid var(--accent-line);
}
a:hover {
  border-bottom-color: var(--accent);
}
a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-bottom-color: transparent;
}

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

.skip {
  position: absolute;
  left: -999px;
}
.skip:focus {
  left: var(--gutter);
  top: 0.5rem;
  z-index: 10;
  background: var(--paper);
  padding: 0.25rem 0.5rem;
}

/* ---------- Header and footer ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
}

.bar {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1rem var(--gutter) 0.85rem;
}

.wordmark {
  color: var(--ink);
  border: 0;
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.site-header nav {
  display: flex;
  gap: 1.5rem;
}
.site-header nav a {
  color: var(--ink);
  border-bottom-color: transparent;
  font-weight: 500;
}
.site-header nav a:hover,
.site-header nav a[aria-current="page"] {
  border-bottom-color: var(--ink);
}

main {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 3.5rem var(--gutter) 4rem;
}

.site-footer {
  border-top: 1px solid var(--rule);
  color: var(--muted);
  font-size: 0.85rem;
}
.site-footer p {
  max-width: var(--wide);
  margin: 0 auto;
  padding: 1.25rem var(--gutter) 3rem;
}

/* ---------- Issues (home) ---------- */

.intro {
  max-width: var(--measure);
  margin: 0 0 3.5rem;
  font-size: 1.2rem;
  line-height: 1.5;
  font-weight: 500;
}

.issue {
  margin: 0 0 3.5rem;
  scroll-margin-top: 5rem;
}

.issue-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.25rem 0.75rem;
  margin: 0;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--ink);
  font-size: 1.15rem;
  font-weight: 600;
  line-height: 1.3;
}
.issue-head .theme {
  font-weight: 400;
}
.issue-head .issue-date {
  margin-left: auto;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 400;
}

.toc {
  list-style: none;
  margin: 0;
  padding: 0;
}
.toc li {
  border-bottom: 1px solid var(--rule);
}
.toc a {
  display: grid;
  grid-template-columns: 3rem 1fr;
  column-gap: 0.75rem;
  padding: 0.85rem 0 0.8rem;
  color: var(--ink);
  border: 0;
}
.toc .no {
  color: var(--muted);
  font-size: 0.85rem;
  font-variant-numeric: tabular-nums;
  padding-top: 0.2rem;
}
.toc .title {
  font-size: 1.1rem;
  font-weight: 500;
  line-height: 1.35;
}
.toc .author {
  grid-column: 2;
  color: var(--muted);
  font-size: 0.9rem;
}
.toc a:hover .title,
.toc a:focus-visible .title {
  color: var(--accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

@media (min-width: 720px) {
  .toc a {
    grid-template-columns: 3.5rem 1fr 13rem;
    align-items: baseline;
  }
  .toc .no {
    padding-top: 0;
  }
  .toc .author {
    grid-column: 3;
    text-align: right;
  }
}

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

.article-head {
  max-width: var(--measure);
  margin: 0 auto 2.5rem;
}

.kicker {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.kicker a {
  border-bottom-color: transparent;
}
.kicker a:hover {
  border-bottom-color: var(--accent);
}

h1 {
  margin: 0 0 1rem;
  font-size: clamp(2rem, 1.3rem + 2.6vw, 2.75rem);
  font-weight: 600;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.dek {
  margin: 0 0 1.25rem;
  color: var(--muted);
  font-size: 1.25rem;
  line-height: 1.45;
  text-wrap: pretty;
}

.byline {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
}

.cover {
  margin: 0 0 2rem;
}
.cover img {
  width: 13rem;
  outline: 1px solid var(--rule);
  outline-offset: -1px;
}

.prose {
  max-width: var(--measure);
  margin: 0 auto;
}
.prose p,
.prose ul,
.prose ol,
.prose blockquote {
  margin: 0 0 1.2em;
}
.prose ul,
.prose ol {
  padding-left: 1.25rem;
}
.prose li {
  margin-bottom: 0.5em;
}
.prose h2,
.prose h3 {
  margin: 2.4em 0 0.75em;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.prose h3 {
  font-size: 1.15rem;
}
.prose h4 {
  margin: 2em 0 0.5em;
  font-size: 1rem;
  font-weight: 600;
}
.prose blockquote {
  padding-left: 1.25rem;
  border-left: 2px solid var(--accent);
}
.prose figure {
  margin: 2.25rem 0;
}
.prose figcaption {
  margin-top: 0.5rem;
  color: var(--muted);
  font-size: 0.85rem;
}
.prose sup {
  line-height: 0;
  font-size: 0.7em;
}
.prose sup a {
  border: 0;
  padding: 0 0.1em;
}

.lead-in {
  font-size: 0.86em;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.end::after {
  content: "";
  display: inline-block;
  width: 0.55em;
  height: 0.55em;
  margin-left: 0.45em;
  background: var(--accent);
  vertical-align: 0.05em;
}

.notes,
.bio {
  max-width: var(--measure);
  margin: 3rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--rule);
  font-size: 0.9rem;
  line-height: 1.55;
}
.notes h2 {
  margin: 0 0 0.75rem;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.notes ol {
  margin: 0;
  padding-left: 1.25rem;
}
.notes li {
  margin-bottom: 0.5rem;
}
.notes li:target {
  background: rgba(44, 92, 106, 0.08);
}
.notes .back {
  border: 0;
}
.bio p {
  margin: 0;
  color: var(--muted);
}

.pager {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  max-width: var(--measure);
  margin: 4rem auto 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ink);
}
.pager a {
  display: block;
  color: var(--ink);
  border: 0;
}
.pager .next {
  text-align: right;
}
.pager .label {
  display: block;
  color: var(--muted);
  font-size: 0.8rem;
}
.pager .t {
  font-weight: 500;
  line-height: 1.35;
}
.pager a:hover .t {
  color: var(--accent);
}

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

.about {
  max-width: var(--measure);
  margin: 0 auto;
}
.about .prose {
  margin-bottom: 3rem;
}
.about .lede {
  font-size: 1.2rem;
  line-height: 1.5;
  font-weight: 500;
}
.about h2 {
  margin: 0 0 0.5rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid var(--ink);
  font-size: 1.15rem;
  font-weight: 600;
}
.about section {
  margin-bottom: 3rem;
}
.plain {
  list-style: none;
  margin: 0;
  padding: 0;
}
.plain li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--rule);
}
.muted {
  color: var(--muted);
}
.contributors .who {
  display: block;
  font-weight: 600;
}

/* ---------- Small screens ---------- */

@media (max-width: 640px) {
  body {
    font-size: 17px;
  }
  :root {
    --gutter: 1.15rem;
  }
  main {
    padding-top: 2.5rem;
  }
  .cover img {
    width: 10rem;
  }
}

/* ---------- Print ---------- */

@media print {
  body {
    background: #fff;
    font-size: 11pt;
  }
  .site-header {
    position: static;
    border: 0;
  }
  .site-header nav,
  .pager,
  .skip {
    display: none;
  }
  a {
    color: inherit;
    border: 0;
  }
  main {
    padding-top: 1rem;
  }
  figure,
  img {
    break-inside: avoid;
  }
}

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}
