/* runv press: a magazine. EB Garamond to read and for the headlines,
   Inter for the small print. Paper and ink,
   one red. Dark when the reader's system is. */

@font-face { font-family: "Garamond"; src: url("fonts/garamond-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Garamond"; src: url("fonts/garamond-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Garamond"; src: url("fonts/garamond-bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/inter.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --paper: #fbf8f2;
  --paper-2: #f3eee4;
  --ink: #15130f;
  --ink-2: #3b372f;
  --muted: #6e675c;
  --rule: #ddd5c6;
  --rule-strong: #15130f;
  --red: #b0122d;
  --red-ink: #ffffff;
  --code: #efe9dd;
  --serif: "Garamond", "EB Garamond", Georgia, "Times New Roman", serif;
  --display: "Garamond", "EB Garamond", Georgia, serif;
  --sans: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: ui-monospace, "JetBrains Mono", "SFMono-Regular", Menlo, Consolas, monospace;
  --page: 76rem;
  --read: 39rem;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #12110e;
    --paper-2: #1b1915;
    --ink: #ede7db;
    --ink-2: #cfc8ba;
    --muted: #9c9486;
    --rule: #2e2a24;
    --rule-strong: #ede7db;
    --red: #ff5c72;
    --red-ink: #12110e;
    --code: #1f1c17;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 400 1.25rem/1.6 var(--serif);
  font-kerning: normal;
  font-variant-ligatures: common-ligatures;
  text-rendering: optimizeLegibility;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--red); }
img { max-width: 100%; height: auto; display: block; }
::selection { background: var(--red); color: var(--red-ink); }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--paper); padding: .5rem 1rem; z-index: 9; }

/* the small print: labels, kickers, bylines, nav */
.label, .kicker, .byline, .bar, .topics, .section-head, .rail-head, .foot-links,
.pager, .tags, .index-list span, .month time, .month .who, .count {
  font-family: var(--sans);
  font-feature-settings: "case", "tnum";
}
.label, .kicker {
  display: inline-block;
  font-size: .72rem;
  font-weight: 650;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--red);
  text-decoration: none;
  margin: 0 0 .6rem;
}
a.kicker:hover { text-decoration: underline; }
.byline { font-size: .8rem; color: var(--muted); margin: .7rem 0 0; letter-spacing: .01em; }
.byline a { color: var(--ink); font-weight: 600; text-decoration: none; }
.byline a:hover { color: var(--red); }
.sep { margin: 0 .25em; }
.quiet { color: var(--muted); font-style: italic; }

/* --- the masthead --------------------------------------------------------- */
.mast { max-width: var(--page); margin: 0 auto; padding: 0 1.5rem; text-align: center; }
.bar {
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  font-size: .76rem; color: var(--muted);
  padding: .9rem 0; border-bottom: 1px solid var(--rule);
}
.bar .links { display: flex; gap: 1.3rem; flex-wrap: wrap; justify-content: flex-end; }
.bar a { text-decoration: none; color: var(--ink-2); }
.bar a:hover { color: var(--red); }
.bar a.write {
  background: var(--ink); color: var(--paper); padding: .35rem .8rem; border-radius: 2px; font-weight: 600;
}
.bar a.write:hover { background: var(--red); color: var(--red-ink); }
.name {
  display: block;
  font: 400 clamp(3.4rem, 11vw, 8.4rem)/1 var(--display);
  letter-spacing: -.01em;
  text-decoration: none;
  color: var(--ink);
  margin: 2.2rem 0 .6rem;
}
.name:hover { color: var(--ink); }
.motto { font-style: italic; color: var(--muted); margin: 0 0 1.4rem; font-size: 1.1rem; }
.topics {
  display: flex; justify-content: center; flex-wrap: wrap; gap: .3rem 1.6rem;
  font-size: .74rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase;
  padding: .85rem 0; border-top: 3px double var(--rule-strong); border-bottom: 1px solid var(--rule-strong);
}
.topics:empty { padding: 0; border-bottom: 0; }
.topics a { text-decoration: none; color: var(--ink); }
.topics a:hover { color: var(--red); }
.inner .name { font-size: clamp(2.6rem, 7vw, 4.4rem); margin: 1.4rem 0 1rem; }
.inner .motto { display: none; }

main { max-width: var(--page); margin: 0 auto; padding: 2.4rem 1.5rem 4rem; }

/* --- headlines ------------------------------------------------------------ */
.hed { font-weight: 400; margin: 0; line-height: 1.12; letter-spacing: -.005em; text-wrap: balance; }
.hed a { text-decoration: none; }
.hed a:hover { color: var(--red); }
.dek { color: var(--ink-2); margin: .55rem 0 0; line-height: 1.45; text-wrap: pretty; }

/* --- the front page -------------------------------------------------------- */
.top-story { display: grid; grid-template-columns: minmax(0, 2.05fr) minmax(0, 1fr); gap: 2.6rem;
  padding-bottom: 2.4rem; border-bottom: 1px solid var(--rule-strong); }
.top-story .lead .pic img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.top-story .lead .words { margin-top: 1.1rem; }
.top-story .lead .hed { font: 400 clamp(2.2rem, 4.4vw, 3.6rem)/1.04 var(--display); letter-spacing: -.01em; }
.top-story .lead .dek { font-size: 1.35rem; }
.top-story .lead.no-pic .hed { font-size: clamp(2.8rem, 6vw, 5rem); }
.top-story .lead.no-pic { border-left: 3px solid var(--red); padding-left: 1.6rem; }
.top-story:has(.side:empty) { grid-template-columns: minmax(0, 1fr); }
.top-story:has(.side:empty) .lead { max-width: 56rem; margin: 0 auto; }
.side:empty { display: none; }
.side { display: flex; flex-direction: column; gap: 1.5rem; border-left: 1px solid var(--rule); padding-left: 2.2rem; }
.brief { padding-bottom: 1.5rem; border-bottom: 1px solid var(--rule); }
.brief:last-child { border-bottom: 0; padding-bottom: 0; }
.brief .pic img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; margin-bottom: .8rem; }
.brief .hed { font-size: 1.5rem; }
.brief .dek { font-size: 1.05rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.2rem;
  padding: 2.4rem 0; border-bottom: 1px solid var(--rule-strong); }
.card .pic img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: .9rem; }
.card .hed { font-size: 1.6rem; }
.card .dek { font-size: 1.08rem; }
.card.no-pic { border-top: 3px solid var(--ink); padding-top: 1rem; }
.card.no-pic .hed { font-size: 2rem; }
.row.small { border-bottom: 0; padding: 1rem 0 0; }
.row.small .card .hed { font-size: 1.35rem; }

.more-news { display: grid; grid-template-columns: minmax(0, 1fr) 19rem; gap: 3rem; padding-top: 2.2rem; }
.more-news.single { grid-template-columns: minmax(0, 1fr); max-width: 52rem; }
.section-head, .rail-head {
  font-size: .78rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  margin: 0 0 1rem; padding-bottom: .55rem; border-bottom: 2px solid var(--ink);
}
.river { list-style: none; margin: 0; padding: 0; }
.item { display: grid; grid-template-columns: minmax(0, 1fr) 10rem; gap: 1.5rem; padding: 1.4rem 0; border-bottom: 1px solid var(--rule); }
.item .thumb { order: 2; }
.item .thumb img { width: 10rem; aspect-ratio: 1 / 1; object-fit: cover; }
.item:not(:has(.thumb)) { grid-template-columns: minmax(0, 1fr); }
.item .hed { font-size: 1.55rem; }
.item .dek { font-size: 1.05rem; }
.river.wide .item { grid-template-columns: minmax(0, 1fr) 12rem; }
.river.wide .item .thumb img { width: 12rem; aspect-ratio: 4 / 3; }

.rail { font-size: 1.05rem; }
.writers { list-style: none; padding: 0; margin: 0 0 2rem; }
.writers li { display: flex; justify-content: space-between; padding: .45rem 0; border-bottom: 1px dotted var(--rule); }
.writers a { text-decoration: none; font-weight: 700; }
.writers span { font-family: var(--sans); font-size: .78rem; color: var(--muted); }

.invite { background: var(--ink); color: var(--paper); padding: 1.8rem 1.6rem; margin: 2.4rem 0 0; }
.rail .invite { margin-top: 0; }
.invite .label { color: var(--paper); opacity: .75; }
.invite .big { font: 400 1.55rem/1.25 var(--serif); margin: .2rem 0 1.2rem; }
.invite .small { font-size: .95rem; opacity: .85; margin: 1rem 0 0; }
.invite code { background: transparent; color: inherit; border: 1px solid currentColor; }
.invite a { color: inherit; }
.button {
  display: inline-block; font: 600 .85rem/1 var(--sans); letter-spacing: .02em;
  padding: .85rem 1.2rem; border-radius: 2px; text-decoration: none;
  background: var(--red); color: var(--red-ink); border: 0; cursor: pointer;
}
.button:hover { background: var(--ink); color: var(--paper); }
.invite .button:hover { background: var(--paper); color: var(--ink); }

.pager { display: flex; justify-content: space-between; align-items: center; padding: 1.6rem 0; font-size: .85rem; }
.pager a { font-weight: 600; text-decoration: none; }
.pager .count { color: var(--muted); }

/* --- an article ------------------------------------------------------------ */
.story-head { max-width: 50rem; margin: 1rem auto 2.4rem; text-align: center; }
.story-head .hed { font: 400 clamp(2.5rem, 6vw, 4.6rem)/1.03 var(--display); letter-spacing: -.012em; }
.story-head .dek { font-size: clamp(1.3rem, 2.2vw, 1.6rem); font-style: italic; margin-top: 1.1rem; }
.story-head .byline { margin-top: 1.4rem; font-size: .82rem; }
.hero { margin: 0 auto 2.8rem; max-width: 68rem; }
.hero img { width: 100%; max-height: 80vh; object-fit: cover; }

.prose { max-width: var(--read); margin: 0 auto; font-size: 1.3rem; line-height: 1.62; hyphens: auto; }
.prose > * { margin: 0 0 1.15em; }
.story .prose > p:first-of-type::first-letter {
  float: left; font: 400 4.7em/.82 var(--display); margin: .07em .1em 0 0; color: var(--red);
  text-transform: uppercase;
}
.prose h2 { font: 700 1.55rem/1.25 var(--serif); margin: 2em 0 .6em; }
.prose h3 { font: 600 .95rem/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; margin: 2em 0 .6em; }
.prose h4, .prose h5, .prose h6 { font: 700 1.2rem/1.3 var(--serif); margin: 1.6em 0 .4em; }
.prose a { color: var(--red); }
.prose a:hover { color: var(--ink); }
.prose blockquote {
  margin: 2em 0; padding: 1.2em 0; border-top: 1px solid var(--ink); border-bottom: 1px solid var(--ink);
  font: italic 400 1.6rem/1.35 var(--serif); text-align: center; color: var(--ink);
}
.prose blockquote p { margin: 0; }
.prose blockquote p + p { margin-top: .6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin: .3em 0; }
.prose li::marker { color: var(--red); }
.prose hr { border: 0; text-align: center; margin: 2.4em 0; }
.prose hr::after { content: "* * *"; letter-spacing: 1em; color: var(--muted); }
.prose figure { margin: 2.2em -4rem; }
.prose figure img { width: 100%; }
.prose figcaption { font: .82rem/1.45 var(--sans); color: var(--muted); margin-top: .6rem; padding: 0 4rem; }
.prose > img, .prose p > img { margin: 1.6em auto; }
.prose code {
  font: .82em var(--mono); background: var(--code); padding: .12em .35em; border-radius: 3px;
}
.prose pre {
  font: .9rem/1.55 var(--mono); background: var(--code); padding: 1.1rem 1.3rem; overflow-x: auto;
  border-left: 3px solid var(--red); hyphens: none;
}
.prose pre code { background: none; padding: 0; font-size: inherit; }
.prose table { width: 100%; border-collapse: collapse; font: .9rem/1.45 var(--sans); }
.prose th { text-align: left; font-weight: 650; border-bottom: 2px solid var(--ink); padding: .5rem .6rem; }
.prose td { border-bottom: 1px solid var(--rule); padding: .5rem .6rem; vertical-align: top; }
.prose mark { background: var(--red); color: var(--red-ink); }

.story-foot { max-width: var(--read); margin: 3rem auto 0; padding-top: 1.4rem; border-top: 3px double var(--ink); }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.6rem; }
.tags a {
  font-size: .72rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  border: 1px solid var(--rule); padding: .35rem .65rem; text-decoration: none; color: var(--ink-2);
}
.tags a:hover { border-color: var(--red); color: var(--red); }
.author-box { background: var(--paper-2); padding: 1.3rem 1.5rem; font-size: 1.1rem; }
.author-box p { margin: 0; }
.author-box .label { margin-bottom: .4rem; }
.author-box .who { font-weight: 700; text-decoration: none; }
.also { margin-top: 3.6rem; }

/* --- lists: writers, topics, archive, a writer's page ----------------------------- */
.list-head { max-width: 52rem; margin: 0 auto 1.6rem; padding-bottom: 1.4rem; border-bottom: 2px solid var(--ink); }
.list-head h1 { font: 400 clamp(2.4rem, 5vw, 3.8rem)/1.05 var(--display); margin: 0; }
.list-head .intro { color: var(--ink-2); margin: .8rem 0 0; font-size: 1.15rem; }
.list-head ~ .river, .list-head ~ .index-list, .list-head ~ .month, .list-head ~ .quiet { max-width: 52rem; margin-left: auto; margin-right: auto; }
.index-list { list-style: none; padding: 0; }
.index-list.cols { columns: 2 16rem; column-gap: 3rem; }
.index-list li { display: flex; justify-content: space-between; align-items: baseline; padding: .6rem 0;
  border-bottom: 1px solid var(--rule); break-inside: avoid; }
.index-list a { font-size: 1.4rem; text-decoration: none; }
.index-list span { font-size: .78rem; color: var(--muted); }
.month h2 { font: 600 .8rem var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin: 2rem 0 .4rem; }
.month ol { list-style: none; padding: 0; margin: 0; }
.month li { display: grid; grid-template-columns: 2.2rem minmax(0, 1fr) auto; gap: 1rem; align-items: baseline;
  padding: .5rem 0; border-bottom: 1px solid var(--rule); }
.month time { font-size: .85rem; color: var(--muted); }
.month li a { text-decoration: none; font-size: 1.2rem; }
.month .who { font-size: .78rem; color: var(--muted); }

.empty { text-align: center; max-width: 40rem; margin: 3rem auto; }
.empty h1 { font: 400 clamp(2.4rem, 6vw, 4rem)/1.05 var(--display); margin: .2rem 0 1rem; }
.about .story-head { text-align: left; max-width: var(--read); }

/* --- the footer ---------------------------------------------------------------- */
.foot { width: min(calc(100% - 3rem), calc(var(--page) - 3rem)); margin: 0 auto; padding: 2.4rem 0 3.4rem; border-top: 3px double var(--ink);
  display: grid; grid-template-columns: auto minmax(0, 36rem); gap: 1rem 3rem; align-items: start; }
.foot-name { font: 400 2.4rem/1 var(--display); grid-row: span 2; }
.foot p { margin: 0; font-size: 1.05rem; color: var(--ink-2); }
.foot .foot-links { display: flex; flex-wrap: wrap; gap: .4rem 1.3rem; font-size: .78rem; }
.foot-links a { text-decoration: none; font-weight: 600; color: var(--ink); }

/* --- smaller screens ---------------------------------------------------------- */
@media (max-width: 960px) {
  .top-story { grid-template-columns: minmax(0, 1fr); }
  .side { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); padding-top: 1.5rem;
    display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1.8rem; }
  .brief { border-bottom: 0; padding-bottom: 0; }
  .more-news { grid-template-columns: minmax(0, 1fr); }
  .prose figure { margin-left: 0; margin-right: 0; }
  .prose figcaption { padding: 0; }
}
@media (max-width: 760px) {
  body { font-size: 1.15rem; }
  .bar { flex-direction: column; gap: .5rem; }
  .bar .links { justify-content: center; gap: .9rem; }
  .row { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .item, .river.wide .item { grid-template-columns: minmax(0, 1fr) 6.5rem; gap: 1rem; }
  .item .thumb img, .river.wide .item .thumb img { width: 6.5rem; aspect-ratio: 1 / 1; }
  .item .dek { display: none; }
  .prose { font-size: 1.2rem; }
  .foot { grid-template-columns: minmax(0, 1fr); }
  .foot-name { grid-row: auto; }
  main { padding-top: 1.6rem; }
}

@media print {
  .bar, .topics, .invite, .also, .foot-links, .skip { display: none; }
  html { background: #fff; color: #000; }
}
