/*
 * Growing Peas — the sowing chart.
 *
 * One typeface, fixed width, throughout. The four products are a table, not
 * cards: name, what it does, status. A filled glyph means the tool can be
 * bought today, a hollow one means it is still growing — ripeness is data in
 * a column, like everything else here. No colour, no radius, no shadow. The
 * discipline is the design, so anything decorative added later will look
 * wrong, which is the point.
 */

:root {
  --paper: #fcfcfa;
  --paper-hover: #f2f2ee;
  --ink: #101010;
  --soft: #4a4a46;
  --faint: #9a9a92;
  --hair: #dededa;
  --mono: ui-monospace, 'SF Mono', 'Cascadia Mono', 'Roboto Mono', Menlo, Consolas,
    monospace;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --paper: #0e0e0d;
    --paper-hover: #171716;
    --ink: #ecece7;
    --soft: #b0b0a8;
    --faint: #75756d;
    --hair: #2a2a27;
  }
}

:root[data-theme='dark'] {
  --paper: #0e0e0d;
  --paper-hover: #171716;
  --ink: #ecece7;
  --soft: #b0b0a8;
  --faint: #75756d;
  --hair: #2a2a27;
}

* {
  box-sizing: border-box;
}

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

body {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.75;
  margin: 0;
  padding: 0 2rem 7rem;
}

.wrap {
  margin: 0 auto;
  max-width: 46rem;
}

a {
  color: var(--ink);
  text-underline-offset: 0.2em;
}

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

/* ── masthead ────────────────────────────────────────────────────────── */

header.site {
  align-items: baseline;
  display: flex;
  gap: 1rem 2rem;
  justify-content: space-between;
  padding: 5rem 0 0;
}

.mark {
  letter-spacing: 0.34em;
  text-decoration: none;
  text-transform: uppercase;
}

.meta {
  color: var(--faint);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-size: 0.72rem;
}

/* ── thesis ──────────────────────────────────────────────────────────── */

.thesis {
  font-size: clamp(1.5rem, 5vw, 2.1rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.3;
  margin: 4rem 0 1rem;
  max-width: 24ch;
}

.sub {
  color: var(--soft);
  margin: 0 0 4.5rem;
  max-width: 58ch;
}

/* ── the chart ───────────────────────────────────────────────────────── */

table {
  border-collapse: collapse;
  width: 100%;
}

thead th {
  border-bottom: 1px solid var(--ink);
  color: var(--faint);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  padding: 0 1rem 0.5rem 0;
  text-align: left;
  text-transform: uppercase;
}

tbody td {
  border-bottom: 1px solid var(--hair);
  padding: 1.15rem 1rem 1.15rem 0;
  vertical-align: top;
}

tbody tr:hover td {
  background: var(--paper-hover);
}

td.name {
  font-size: 1rem;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

td.name a {
  border-bottom: 1px solid var(--ink);
  text-decoration: none;
}

td.what {
  color: var(--soft);
  width: 100%;
}

td.status {
  color: var(--faint);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
}

td.status b {
  color: var(--ink);
  font-weight: 400;
}

.glyph {
  display: inline-block;
  width: 1.2em;
}

/* ── contact ─────────────────────────────────────────────────────────── */

.contact {
  border-top: 1px solid var(--ink);
  margin-top: 5rem;
  padding-top: 1.5rem;
}

.contact p {
  color: var(--soft);
  margin: 0 0 0.9rem;
  max-width: 58ch;
}

.contact .big {
  color: var(--ink);
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

/* ── footer ──────────────────────────────────────────────────────────── */

footer.site {
  color: var(--faint);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  line-height: 2.2;
  margin-top: 4rem;
  text-transform: uppercase;
}

footer.site p {
  margin: 0;
}

footer.site a {
  color: var(--faint);
}

footer.site a:hover {
  color: var(--ink);
}

/* ── document pages ──────────────────────────────────────────────────── */

.doc {
  max-width: 64ch;
}

.doc h1 {
  font-size: clamp(1.4rem, 4.5vw, 1.9rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  margin: 4rem 0 0.5rem;
}

.doc .updated {
  color: var(--faint);
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  margin: 0 0 3rem;
  text-transform: uppercase;
}

.doc h2 {
  border-top: 1px solid var(--ink);
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  margin: 3.25rem 0 1.25rem;
  padding-top: 0.5rem;
  text-transform: uppercase;
}

.doc h3 {
  font-size: 0.95rem;
  font-weight: 400;
  letter-spacing: -0.01em;
  margin: 2rem 0 0.35rem;
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

.doc p,
.doc li {
  color: var(--soft);
}

.doc p {
  margin: 0 0 1rem;
}

.doc strong {
  color: var(--ink);
  font-weight: 400;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.doc ul {
  list-style: none;
  margin: 0 0 1rem;
  padding-left: 1.6rem;
}

.doc li {
  margin-bottom: 0.4rem;
  position: relative;
}

.doc li::before {
  content: '—';
  left: -1.6rem;
  position: absolute;
}

dl.facts {
  display: grid;
  gap: 0.5rem 2rem;
  grid-template-columns: 11rem 1fr;
  margin: 1.5rem 0 2rem;
}

dl.facts dt {
  color: var(--faint);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  padding-top: 0.35rem;
  text-transform: uppercase;
}

dl.facts dd {
  color: var(--ink);
  margin: 0;
}

@media (max-width: 42rem) {
  body {
    font-size: 13.5px;
    padding: 0 1.5rem 5rem;
  }

  thead {
    display: none;
  }

  tbody tr {
    border-bottom: 1px solid var(--hair);
    display: block;
    padding: 1.25rem 0;
  }

  tbody td {
    border: 0;
    display: block;
    padding: 0.1rem 0;
  }

  td.status {
    padding-top: 0.6rem;
  }

  dl.facts {
    gap: 0.1rem;
    grid-template-columns: 1fr;
  }

  dl.facts dd {
    margin-bottom: 1rem;
  }
}
