:root {
  color-scheme: light;
  --paper: #ffffff;
  --paper-soft: #f7f8f6;
  --ink: #1e211f;
  --muted: #5f6761;
  --line: #d9dfdc;
  --accent: #256c5a;
  --accent-strong: #0f5c84;
  --accent-soft: #e9f3ef;
  --code: #f2f4f8;
}

* {
  box-sizing: border-box;
}

html {
  background: var(--paper);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: var(--accent-strong);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.16em;
}

.site-header {
  align-items: flex-start;
  border-bottom: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: flex-start;
  padding: 18px 32px;
}

.site-title {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  justify-content: flex-start;
  min-width: 0;
}

nav a {
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  padding: 3px 0;
  text-decoration: none;
}

nav a[aria-current="page"],
nav a:hover {
  border-color: var(--accent);
  color: var(--ink);
}

main {
  margin: 0 auto;
  max-width: 1120px;
  padding: 44px 28px 72px;
}

.home-grid,
.category-grid {
  display: grid;
  gap: 34px;
  grid-template-columns: minmax(0, 1fr);
}

.intro {
  border-bottom: 1px solid var(--line);
  margin-bottom: 34px;
  max-width: 760px;
  padding-bottom: 28px;
}

h1,
h2,
h3 {
  line-height: 1.1;
  margin: 0;
}

h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 700;
}

h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 28px;
}

h3 {
  font-size: 18px;
}

.dek,
.post-summary,
.muted {
  color: var(--muted);
}

.dek {
  font-size: 18px;
  line-height: 1.55;
  margin: 14px 0 0;
}

.category-block {
  border-top: 1px solid var(--line);
  padding-top: 24px;
}

.section-heading {
  align-items: baseline;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 18px;
}

.post-list {
  display: grid;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.post-list li {
  border-bottom: 1px solid var(--line);
  padding-bottom: 18px;
}

.post-title {
  color: var(--ink);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 22px;
  font-weight: 700;
  text-decoration: none;
}

.post-title:hover {
  color: var(--accent-strong);
}

.post-meta {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 13px;
  gap: 8px;
  margin: 7px 0 0;
}

.post-summary {
  line-height: 1.5;
  margin: 8px 0 0;
  max-width: 720px;
}

.article-shell {
  display: grid;
  gap: 42px;
  grid-template-columns: minmax(0, 720px) minmax(220px, 280px);
  justify-content: center;
}

.article-main {
  min-width: 0;
}

.article-kicker {
  color: var(--accent);
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.article-title {
  font-family: Georgia, "Times New Roman", serif;
  font-size: 48px;
  font-weight: 700;
  line-height: 1.05;
  margin-bottom: 14px;
}

.article-dek {
  color: var(--muted);
  font-size: 19px;
  line-height: 1.55;
  margin: 0 0 18px;
}

.article-body {
  border-top: 1px solid var(--line);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 19px;
  line-height: 1.72;
  margin-top: 28px;
  padding-top: 30px;
}

.article-body h1,
.article-body h2,
.article-body h3 {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.2;
  margin: 34px 0 12px;
}

.article-body h1 {
  font-size: 28px;
}

.article-body h2 {
  font-size: 24px;
}

.article-body h3 {
  font-size: 20px;
}

.article-body p,
.article-body ul,
.article-body ol,
.article-body blockquote,
.article-body pre {
  margin: 0 0 1.1em;
}

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

.article-body blockquote {
  border-left: 3px solid var(--accent);
  color: #3d4641;
  margin-left: 0;
  padding-left: 18px;
}

code,
pre {
  background: var(--code);
  border-radius: 6px;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  padding: 0.1em 0.25em;
}

pre {
  overflow: auto;
  padding: 14px;
}

pre code {
  background: transparent;
  padding: 0;
}

.side-panel {
  align-self: start;
  border-left: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
  padding-left: 22px;
  position: sticky;
  top: 24px;
}

.side-panel h2 {
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  margin: 0 0 10px;
}

.side-panel a {
  display: inline-block;
  margin: 5px 0;
}

.side-panel code {
  overflow-wrap: anywhere;
  white-space: normal;
}

.talk-link {
  background: var(--accent-soft);
  border: 1px solid #c6ded6;
  border-radius: 6px;
  color: #164d40;
  display: inline-flex;
  font-weight: 700;
  margin: 12px 0 20px;
  padding: 9px 12px;
  text-decoration: none;
}

.distribution-list {
  display: grid;
  gap: 10px;
  list-style: none;
  margin: 16px 0 0;
  padding: 0;
}

.distribution-list li {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
}

.status-pill {
  border: 1px solid var(--line);
  border-radius: 999px;
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  margin-right: 8px;
  padding: 3px 8px;
}

.status-pill.current,
.status-pill.tracked {
  background: var(--accent-soft);
  border-color: #c6ded6;
  color: #164d40;
}

.status-pill.stale-source,
.status-pill.missing-source,
.status-pill.missing-source-commit,
.status-pill.bad-source-commit,
.status-pill.source-not-in-commit {
  background: #fff0f0;
  border-color: #e7baba;
  color: #8b2e2e;
}

details {
  border-top: 1px solid var(--line);
  margin-top: 22px;
  padding-top: 14px;
}

summary {
  color: var(--ink);
  cursor: pointer;
  font-weight: 700;
}

.json-block {
  font-size: 12px;
  line-height: 1.45;
  margin-top: 12px;
  max-height: 560px;
  white-space: pre-wrap;
}

.history-list {
  margin: 12px 0 0;
  padding-left: 20px;
}

.history-list li {
  margin-bottom: 8px;
}

.controls {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: 1fr 220px;
  margin: 24px 0;
}

.controls label {
  color: var(--muted);
  display: grid;
  font-size: 13px;
  gap: 6px;
}

input,
select {
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  font: inherit;
  padding: 9px 10px;
}

.domain-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
  margin: 0 0 22px;
  padding: 0;
}

.domain-strip button {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  max-width: 100%;
  overflow-wrap: anywhere;
  padding: 6px 10px;
}

.domain-strip button:hover {
  border-color: var(--accent);
}

.table-wrap {
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 880px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 10px 9px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  text-transform: uppercase;
}

td {
  font-size: 14px;
  line-height: 1.45;
}

.url-cell {
  max-width: 360px;
  overflow-wrap: anywhere;
}

.empty {
  border: 1px dashed var(--line);
  color: var(--muted);
  padding: 18px;
}

@media (max-width: 860px) {
  .site-header {
    padding: 16px 22px;
  }

  main {
    padding: 32px 20px 56px;
  }

  h1,
  .article-title {
    font-size: 34px;
  }

  .article-shell {
    display: block;
  }

  .side-panel {
    border-left: 0;
    border-top: 1px solid var(--line);
    margin-top: 32px;
    padding-left: 0;
    padding-top: 22px;
    position: static;
  }

  .controls {
    grid-template-columns: 1fr;
  }
}
