/* Palette and type borrowed from blog.lmorchard.com (build/css/base-vars.css)
   and structure from links.lmorchard.com (templates/static/style.css). */
:root {
  --font-serif: "Bitter", Georgia, "Times New Roman", serif;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;

  --bg: #f2f0eb;
  --bg-raised: #e4e0d6;
  --fg: #26221c;
  --fg-muted: #6b6355;
  --rule: color-mix(in srgb, #6b6355 32%, transparent);
  --link: #0c5a72;
  --link-hover: #093f50;

  --font-size: 17px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1a1815;
    --bg-raised: #24211d;
    --fg: #e8e3d9;
    --fg-muted: #a29a8a;
    --rule: color-mix(in srgb, #a29a8a 28%, transparent);
    --link: #7fc4d8;
    --link-hover: #a5dced;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-serif);
  font-size: var(--font-size);
  line-height: 1.65;
}

/* Masthead mirrors the blog: text on paper, hairline rule, no gradient. */
header.site {
  border-bottom: 1px solid var(--rule);
  padding: 1.5rem 0 1.25rem;
  margin-bottom: 2.25rem;
}
header.site .inner,
main,
footer.site .inner {
  max-width: 46rem;
  margin: 0 auto;
  padding: 0 1.25rem;
}
header.site .inner {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
header.site h1 {
  font-size: 1.4rem;
  margin: 0;
  font-weight: 700;
}
header.site h1 a { color: inherit; text-decoration: none; }
header.site nav { font-family: var(--font-sans); font-size: 0.82rem; }
header.site nav a { color: var(--fg-muted); margin-left: 1.25rem; }

main { padding-bottom: 3rem; }

h1, h2, h3 { font-family: var(--font-serif); font-weight: 700; line-height: 1.25; }

.lede {
  color: var(--fg-muted);
  font-size: 1rem;
  margin: 0 0 2rem;
  max-width: 38rem;
}

a { color: var(--link); text-decoration: none; }
a:hover { color: var(--link-hover); text-decoration: underline; }

.back { font-family: var(--font-sans); font-size: 0.8rem; margin: 0 0 1.5rem; }

/* Facets: capsule cloud, after links.lmorchard.com's .tag-cloud / .tag-pill. */
.facets { margin-bottom: 2.5rem; }
.facets h2 {
  font-family: var(--font-sans);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--fg-muted);
  margin: 0 0 0.75rem;
  font-weight: 600;
}
.facets ul {
  list-style: none;
  margin: 0 0 1.75rem;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  font-family: var(--font-sans);
}
.facets li { margin: 0; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.3rem 0.7rem;
  border: 1px solid var(--rule);
  border-radius: 6px;
  background: var(--bg-raised);
  color: var(--fg);
  font-size: 0.85rem;
  line-height: 1.3;
  text-decoration: none;
}
.pill:hover {
  border-color: var(--link);
  color: var(--link);
  text-decoration: none;
}
.pill .count {
  font-size: 0.7rem;
  background: color-mix(in srgb, var(--link) 14%, transparent);
  color: var(--link);
  padding: 0.08rem 0.4rem;
  border-radius: 9999px;
  font-variant-numeric: tabular-nums;
}

/* Entry list: hairline separators, generous leading — the blog's prose rhythm. */
ul.tools { list-style: none; margin: 0; padding: 0; }
.tool { padding: 1.4rem 0; border-bottom: 1px solid var(--rule); }
.tool:first-child { border-top: 1px solid var(--rule); }

.tool .name {
  font-size: 1.15rem;
  font-weight: 700;
  display: inline;
}
.badge {
  font-family: var(--font-sans);
  font-size: 0.62rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--fg-muted);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.05rem 0.4rem;
  margin-left: 0.6rem;
  vertical-align: 0.15em;
  white-space: nowrap;
}
.date {
  font-family: var(--font-sans);
  color: var(--fg-muted);
  font-size: 0.75rem;
  margin-left: 0.6rem;
}
.desc { margin: 0.5rem 0 0; font-size: 0.95rem; }
.note {
  margin: 0.6rem 0 0;
  padding-left: 0.85rem;
  border-left: 2px solid var(--rule);
  color: var(--fg-muted);
  font-size: 0.9rem;
  font-style: italic;
}
.tags { font-family: var(--font-sans); margin: 0.6rem 0 0; font-size: 0.72rem; }
.tags a { color: var(--fg-muted); margin-right: 0.75rem; }
.tags a:hover { color: var(--link); }

.empty { color: var(--fg-muted); padding: 2rem 0; }

footer.site {
  border-top: 1px solid var(--rule);
  padding: 1.5rem 0 3rem;
  color: var(--fg-muted);
  font-family: var(--font-sans);
  font-size: 0.75rem;
}

@media (max-width: 600px) {
  body { font-size: 16px; }
  .facets { gap: 1.75rem; }
  header.site .inner { flex-direction: column; align-items: flex-start; }
  header.site nav a { margin-left: 0; margin-right: 1.25rem; }
}
