:root {
  --ink: #1a1a1a;
  --cell: #2a2a2a;
  --green: #1f4d3a;
  --paper: #f4f1ea;
  --rule: #d8d4cb;
  --muted: #6b675f;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  line-height: 1.55;
  font-size: 17px;
}
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 0.15em; }
a:hover { text-decoration-color: var(--ink); }
.site-header, .site-footer, main {
  max-width: 1040px;
  margin: 0 auto;
  padding: 1rem 1.5rem;
}
main { min-height: 60vh; padding-top: 1.5rem; padding-bottom: 3rem; }

/* Header: wide logo on desktop, mark alone on small screens. */
.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem 2rem;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--rule);
}
.brand { display: flex; align-items: center; text-decoration: none; }
.brand-logo { display: block; width: 280px; height: auto; }
.brand-mark { display: none; width: 108px; height: auto; }
@media (max-width: 639px) {
  .brand-logo { display: none; }
  .brand-mark { display: block; }
}
nav { display: flex; gap: 1.25rem; flex-wrap: wrap; }
nav a { text-decoration: none; padding: 0.2rem 0; border-bottom: 2px solid transparent; }
nav a:hover, nav a[aria-current="page"] { border-bottom-color: var(--ink); }

/* Type */
h1, h2, h3 { font-weight: 650; letter-spacing: -0.01em; line-height: 1.2; margin: 0 0 0.5rem; }
h1 { font-size: clamp(1.8rem, 3.2vw, 2.4rem); }
h2 { font-size: 1.25rem; }
h3 { font-size: 1.05rem; }
.intro { padding: 1.5rem 0 2rem; border-bottom: 1px solid var(--rule); }
.intro h1 { font-size: clamp(2.2rem, 4.5vw, 3.2rem); margin: 0; }
.dek { font-size: 1.3rem; margin: 0.5rem 0 0.25rem; max-width: 40rem; }
.sub { color: var(--muted); margin: 0.25rem 0 1.5rem; max-width: 44rem; }
.muted { color: var(--muted); }
.crumb { font-family: var(--mono); font-size: 0.85rem; margin: 0 0 0.5rem; }

/* Sections and the wrapping row of cards */
.index { padding: 1.75rem 0 0.5rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.75rem; }
.section-head a { font-family: var(--mono); font-size: 0.85rem; }
.row { display: flex; flex-wrap: wrap; gap: 1rem; }
.card {
  flex: 1 1 260px;
  max-width: 100%;
  background: #fbfaf7;
  border: 1px solid var(--rule);
  border-radius: 6px;
  padding: 0.9rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.card header { display: flex; justify-content: space-between; align-items: flex-start; gap: 0.75rem; }
.card h3 { margin: 0; font-family: var(--mono); font-weight: 600; word-break: break-word; }
.card p { margin: 0; }
.card-links { font-family: var(--mono); font-size: 0.85rem; }
/* A card with a page is tappable anywhere: the title link stretches over the
   whole card. The pill and body text looked tappable on phones but were not. */
.card-linked { position: relative; }
.card-linked h3 a::after { content: ""; position: absolute; inset: 0; border-radius: 6px; }
.card-linked:hover { border-color: var(--ink); }
.card-linked .card-cta a, .card-linked .card-links a { position: relative; z-index: 1; }
.card-cta { margin-top: 0.25rem; }
.card-cta .button { font-size: 0.9rem; padding: 0.45rem 0.9rem; }
.tags { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.tags li { font-family: var(--mono); font-size: 0.75rem; color: var(--muted); border: 1px solid var(--rule); border-radius: 3px; padding: 0.05rem 0.4rem; }

/* Status pills: the only green outside the mark. */
.pill {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.72rem;
  line-height: 1.5;
  padding: 0 0.5rem;
  border-radius: 999px;
  white-space: nowrap;
  color: #f4f1ea;
  background: var(--cell);
}
.pill-oss { background: var(--green); }
.pill-free { background: var(--green); }
.pill-coming { background: var(--cell); }
.pill-paid { background: var(--ink); }
.pill-draft { background: transparent; color: var(--muted); border: 1px solid var(--rule); }

/* Project page: download box and release notes */
.project { max-width: 44rem; }
.project-head { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.project-head h1 { margin: 0; }
.project .tags { margin-top: 0.5rem; }
.download { margin: 2rem 0; padding: 1.25rem 1.5rem; border: 1px solid var(--rule); border-radius: 4px; background: #fbfaf7; }
.download-cta { display: flex; align-items: center; gap: 0.5rem 1rem; flex-wrap: wrap; margin: 0.75rem 0 1rem; }
.download-meta { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); }
.button {
  display: inline-block; text-decoration: none; border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  padding: 0.55rem 1.1rem; border-radius: 4px;
}
.button:hover { background: var(--cell); color: var(--paper); }
.release-facts { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; margin: 0; }
.release-facts dt { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); padding-top: 0.15rem; }
.release-facts dd { margin: 0; min-width: 0; }
.sha { font-family: var(--mono); font-size: 0.8rem; word-break: break-all; }
.first-launch { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.first-launch p { margin: 0.25rem 0; }
.first-launch ol { margin: 0.5rem 0 0; padding-left: 1.25rem; }
.release { padding: 1rem 0; border-top: 1px solid var(--rule); }
.release h3 time { font-family: var(--mono); font-size: 0.8rem; font-weight: 400; color: var(--muted); margin-left: 0.75rem; }
.release-notes p { margin: 0.4rem 0; }
.release-notes ul { margin: 0.4rem 0; padding-left: 1.25rem; }
.release-notes h4 { font-size: 0.95rem; margin: 0.75rem 0 0.25rem; }

/* Notes */
.note-list { list-style: none; margin: 0; padding: 0; }
.note-list li { padding: 0.75rem 0; border-top: 1px solid var(--rule); }
.note-list li:last-child { border-bottom: 1px solid var(--rule); }
.note-list li > a { font-weight: 600; }
.note-list p { margin: 0.2rem 0 0; color: var(--muted); }
.note-list time, .note-meta time { font-family: var(--mono); font-size: 0.8rem; color: var(--muted); margin-left: 0.5rem; }
.note { max-width: 44rem; }
.note-body { max-width: 40rem; }

/* Sites table (unlinked page) */
.table-wrap { overflow-x: auto; }
table.sites { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
table.sites th, table.sites td { text-align: left; padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid var(--rule); vertical-align: top; }
table.sites th { font-family: var(--mono); font-size: 0.8rem; font-weight: 600; color: var(--muted); }
table.sites a { font-family: var(--mono); font-size: 0.85rem; word-break: break-all; }
table.sites td.thumb-cell { width: 160px; padding-right: 1rem; }
table.sites .site-thumb { display: block; width: 160px; height: auto; border: 1px solid var(--rule); background: #fff; }
table.sites .site-thumb--empty { font-family: var(--mono); font-size: 0.75rem; padding: 2.5rem 0; text-align: center; }
table.sites td strong a { font-family: inherit; font-size: inherit; word-break: normal; }
@media (max-width: 639px) {
  .table-wrap { overflow-x: visible; }
  table.sites, table.sites tbody, table.sites tr, table.sites td { display: block; width: 100%; }
  table.sites thead { display: none; }
  table.sites tr { border-bottom: 1px solid var(--rule); padding: 0 0 0.75rem; margin-bottom: 0.75rem; }
  table.sites td { border-bottom: none; padding: 0.2rem 0; }
  table.sites td.thumb-cell { width: 100%; padding: 0 0 0.5rem; }
  table.sites .site-thumb, table.sites .site-thumb--empty { width: 100%; }
  table.sites td[data-label]::before { content: attr(data-label) ": "; font-family: var(--mono); font-size: 0.75rem; font-weight: 600; color: var(--muted); }
  table.sites a { display: inline-block; padding: 0.6rem 0; overflow-wrap: anywhere; word-break: normal; }
}

/* Contact form */
.lead-form { max-width: 32rem; }
.lead-form p { display: flex; flex-direction: column; gap: 0.3rem; }
.lead-form input, .lead-form textarea {
  font: inherit; padding: 0.5rem 0.6rem; border: 1px solid var(--rule); border-radius: 4px; background: #fbfaf7; color: var(--ink);
}
.lead-form input:focus, .lead-form textarea:focus { outline: 2px solid var(--ink); outline-offset: 1px; }
button {
  font: inherit; cursor: pointer; border: 1px solid var(--ink); background: var(--ink); color: var(--paper);
  padding: 0.5rem 1rem; border-radius: 4px;
}
button:hover { background: var(--cell); }
.messages { list-style: none; margin: 0 0 1.5rem; padding: 0.75rem 1rem; border: 1px solid var(--rule); border-left: 3px solid var(--green); background: #fbfaf7; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); display: flex; align-items: center; gap: 0.75rem; color: var(--muted); font-size: 0.9rem; }
.footer-mark { width: 68px; height: auto; }
.site-footer p { margin: 0; }
