/* Fonts: Source Serif 4 for reading, Source Sans 3 for the mock-up.
   All are self-hosted, so no visitor data goes to a font CDN.
   The headings use Adobe's own Subhead Semibold because it has true small caps;
   the variable web subsets below have them stripped out. */
@font-face {
  font-family: "Source Serif Head"; font-weight: 600; font-display: swap;
  src: url("fonts/source-serif-4-subhead-semibold.woff2") format("woff2");
}
@font-face {
  font-family: "Source Serif 4"; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-serif-4-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4"; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-serif-4-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-serif-4-latin-italic.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Serif 4"; font-style: italic; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-serif-4-latin-ext-italic.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Source Sans 3"; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-sans-3-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Source Sans 3"; font-weight: 200 900; font-display: swap;
  src: url("fonts/source-sans-3-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2C60-2C7F, U+A720-A7FF;
}

/* Black on white, or the reverse. Structure comes from type and rules, not colour. */
:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --surface: #f8f8f8;
  --raised: #eeeeee;
  --ink: #000000;
  --muted: #555555;
  --line: #bbbbbb;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --head: "Source Serif Head", var(--serif);
  --sans: "Source Sans 3", system-ui, -apple-system, "Segoe UI", sans-serif;
  --gap: clamp(2rem, 5vw, 3.5rem);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #141414;
    --surface: #1c1c1c;
    --raised: #262626;
    --ink: #e8e8e8;
    --muted: #a6a6a6;
    --line: #4d4d4d;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 1.1875rem/1.55 var(--serif);
  font-kerning: normal;
}
a {
  color: inherit;
  text-decoration: underline 1px;
  text-underline-offset: .16em;
}
a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
p { margin: 0; text-wrap: pretty; }
p + p { text-indent: 2.4em; }

nav, main {
  width: min(100% - 2.5rem, 62rem);
  margin-inline: auto;
}

/* A quiet line of links: the initials on the left, the rest on the right. */
nav {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .2rem 1.75rem;
  margin-top: 1.25rem;
}
nav a {
  font: 600 1.05rem/1.4 var(--head);
  font-variant-caps: small-caps;
  letter-spacing: .02em;
  text-decoration: none;
  white-space: nowrap;
}
nav a:hover { text-decoration: underline 1px; text-underline-offset: .16em; }
nav a[aria-current] { text-decoration: underline 1px; text-underline-offset: .16em; }
nav .mark { margin-right: auto; }

header { margin: clamp(2.5rem, 7vw, 4.5rem) 0 clamp(2rem, 5vw, 3rem); text-align: center; }
h1 {
  font: 600 clamp(2.5rem, 1.9rem + 3vw, 3.75rem)/1.1 var(--head);
  font-variant-caps: small-caps;
  letter-spacing: -.02em;
  margin: 0 0 .7rem;
  text-wrap: balance;
}
.field { font-style: italic; text-indent: 0; }

/* Parallel text, like a bilingual edition: Polish left, English right. */
.parallel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: var(--gap);
}

main { padding-bottom: clamp(2.5rem, 6vw, 4rem); }
section { margin-bottom: 1.75rem; scroll-margin-top: 1rem; }
h2 {
  font: 600 1.6rem/1.2 var(--head);
  font-variant-caps: small-caps;
  letter-spacing: -.01em;
  margin: 0 0 .4rem;
}
.parallel p { hyphens: auto; }

.kit h3 {
  font: 600 1.3rem/1.2 var(--head);
  font-variant-caps: small-caps;
  margin: 0;
}
.soon { font-style: italic; color: var(--muted); margin-bottom: .45rem; }
.soon + p { text-indent: 0; }

/* The mock-up: a cut of a project page that runs off into the paper. */
.mock { margin: 1.75rem 0 0; }
.sheet {
  max-height: 28rem;
  overflow: hidden;
  padding: 1.5rem 1.6rem 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-bottom: 0;
  font-family: var(--sans);
  -webkit-mask-image: linear-gradient(to bottom, #000 68%, transparent);
  mask-image: linear-gradient(to bottom, #000 68%, transparent);
}
.sheet p { text-indent: 0; }
.sheet .eyebrow {
  font: 700 .72rem/1 var(--sans);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .45rem;
}
.sheet .title { font: 800 1.35rem/1.15 var(--sans); margin: 0 0 .4rem; }
.sheet .question { font: 400 1rem/1.45 var(--serif); color: var(--muted); margin: 0 0 .9rem; }
.sheet .status {
  font: 400 .98rem/1.5 var(--serif);
  margin: 0 0 1rem;
  padding: .6rem .75rem;
  background: var(--raised);
}
.sheet .status b { font-family: var(--sans); font-weight: 650; }
.tasks { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.tasks li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: baseline;
  padding: .55rem 0;
  border-bottom: 1px solid var(--line);
}
.task { font-weight: 600; font-size: 1rem; text-decoration: underline 1px; text-underline-offset: 2px; }
.tasks small { display: block; color: var(--muted); font-size: .82rem; }
.done { color: var(--muted); font-size: .82rem; font-weight: 600; }
.tag { font-size: .82rem; font-weight: 600; white-space: nowrap; }
figcaption { font: italic 400 .9rem/1.4 var(--serif); color: var(--muted); margin-top: .35rem; text-align: center; }

/* Writing: one column, set for reading. */
.essay { width: min(100% - 2.5rem, 40rem); }
.essay header { margin-bottom: clamp(2rem, 5vw, 3rem); }
.essay h1 { font-size: clamp(2rem, 1.6rem + 2vw, 2.75rem); }
.essay p { hyphens: auto; }
.essay h2 { font-size: 1.45rem; margin: 2.25rem 0 .4rem; }
.subtitle { font-style: italic; hyphens: manual; text-wrap: balance; margin-bottom: .4rem; }
.origin { color: var(--muted); font-size: .95rem; font-style: italic; hyphens: manual; }
.subtitle + .origin { text-indent: 0; }
.essay > p.definition { font-style: italic; margin-bottom: .75rem; text-align: left; }
.essay dl { margin: 0; }
.essay dl div + div { margin-top: .75rem; }
.essay dt { font: 600 1.05rem/1.3 var(--head); font-variant-caps: small-caps; letter-spacing: .02em; }
.essay dd { margin: 0; hyphens: auto; }
.essay dd ul { list-style: disc; margin: .4rem 0 0; padding-left: 1.4em; text-align: left; }
.essay figure { margin: 1.75rem 0; }
/* The chart has a transparent background and dark text, so it stays on white. */
.essay figure img {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--line);
}
.posts { list-style: none; margin: 0; padding: 0; }
.posts li + li { margin-top: 1rem; }
.posts a { font-size: 1.2rem; text-wrap: pretty; }

@media (min-width: 40.01rem) {
  .parallel p:not(.soon), .essay > p, .essay dd { text-align: justify; }
}
@media (max-width: 40rem) {
  body { font-size: 1.0625rem; }
  nav { justify-content: space-between; column-gap: .75rem; }
  nav .mark { display: none; }
  nav a { font-size: 1rem; }
  .parallel { grid-template-columns: minmax(0, 1fr); }
  .parallel > [lang="en"] { margin-top: 1.4rem; }
  .sheet { padding-inline: 1.1rem; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}
