/* jwrld — newspaper, stripped down: e-ink paper, ink, thin rules, type. */

:root {
  --paper: #eeece6;   /* e-ink grey; swap for #ffffff for plain white */
  --ink: #222220;
  --muted: #6f6d66;
  --faint: #cfccc3;
  --serif: "Newsreader", Georgia, "Times New Roman", serif;
  --mono: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

html { background: var(--paper); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 680px;
  margin: 0 auto;
  padding: 0 20px;
}

a { color: inherit; text-underline-offset: 3px; text-decoration-thickness: 1px; }

strong, b { font-weight: 600; }

hr {
  border: 0;
  border-top: 1px solid var(--ink);
  margin: 2.5em 0 1em;
}

/* ── Masthead ─────────────────────────────── */

.masthead { padding-top: 36px; }
.masthead hr { margin: 14px 0 44px; }

.masthead .bar {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.logo {
  font-size: 2.6rem;
  font-weight: 200;
  letter-spacing: -0.01em;
  line-height: 1;
  text-decoration: none;
}

nav a {
  margin-left: 24px;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}
nav a:hover, nav a[aria-current="page"] { color: var(--ink); }
nav a[aria-current="page"] { border-bottom: 1px solid var(--ink); padding-bottom: 2px; }

/* ── Type ─────────────────────────────────── */

/* post titles are the only bold headings on the site */
h1 {
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.015em;
  margin: 0.15em 0 0;
}

h2, h3 { font-weight: 400; line-height: 1.25; }
article h2 { font-size: 1.45rem; margin: 2em 0 0.4em; }
article h3 { font-size: 1.15rem; font-style: italic; margin: 1.6em 0 0.3em; }

p, ul, ol { margin: 0 0 1.1em; }

.dateline, .loglist time {
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
}

.dateline { display: block; }

hr.short { width: 60px; margin: 1.25em 0 2em; border-color: var(--muted); }

/* ── Post list ────────────────────────────── */

.loglist { list-style: none; padding: 0; margin: 0; }
.loglist li { margin: 0 0 1.6em; }
.loglist time { display: block; }
.loglist a {
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}
.loglist a:hover { text-decoration: underline; }
.loglist .tldr { margin: 0.25em 0 0; color: var(--muted); }

/* ── TL;DR ────────────────────────────────── */

.post .tldr {
  margin: 0.6em 0 0;
  font-size: 1.15rem;
  line-height: 1.5;
  color: var(--muted);
}
.tldr-label {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--ink);
  margin-right: 0.4em;
  vertical-align: 0.15em;
}

/* ── Post body ────────────────────────────── */

blockquote {
  margin: 1.6em 0;
  padding: 0 0 0 20px;
  border-left: 1px solid var(--ink);
  font-style: italic;
}
blockquote p { margin: 0; }

code { font-family: var(--mono); font-size: 0.8em; }

pre {
  margin: 0 0 1.4em;
  padding: 14px 0;
  border-top: 1px solid var(--faint);
  border-bottom: 1px solid var(--faint);
  overflow-x: auto;
  line-height: 1.5;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.4em;
  font-size: 0.9rem;
}
thead th {
  text-align: left;
  font-weight: 400;
  font-size: 0.68rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--ink);
  padding: 6px 8px 6px 0;
}
td { padding: 8px 8px 8px 0; border-bottom: 1px solid var(--faint); }

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

main { padding-bottom: 80px; }

/* ── Phone ────────────────────────────────── */

@media (max-width: 560px) {
  body { font-size: 18px; }
  .masthead { padding-top: 24px; }
  .logo { font-size: 2.2rem; }
  nav a { margin-left: 16px; }
  h1 { font-size: 2rem; }
  table { display: block; overflow-x: auto; }
}

/* readable by search engines and screen readers, not shown */
.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
