:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --text: #24211d;
  --muted: #706a61;
  --line: #ded8cf;
  --surface: #ffffff;
  --accent: #0f6c5f;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: ui-serif, Georgia, Cambria, "Times New Roman", serif;
  line-height: 1.65;
}

a {
  color: inherit;
}

img {
  display: block;
  width: 100%;
  height: auto;
}

picture {
  display: block;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  max-width: 1040px;
  margin: 0 auto;
  padding: 26px 24px;
  border-bottom: 1px solid var(--line);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.brand {
  font-weight: 700;
  text-decoration: none;
}

nav {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 14px;
}

nav a {
  text-decoration: none;
}

nav a:hover {
  color: var(--accent);
}

.page,
.article {
  max-width: 920px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}

.intro {
  max-width: 720px;
  margin-bottom: 44px;
}

.eyebrow,
.date,
.caption,
figcaption {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  line-height: 1.15;
  letter-spacing: 0;
}

h1 {
  max-width: 820px;
  margin: 0;
  font-size: clamp(42px, 8vw, 76px);
}

h2 {
  margin: 56px 0 16px;
  font-size: 28px;
}

p,
li {
  font-size: 19px;
}

ul {
  padding-left: 24px;
}

.post-list {
  display: grid;
  gap: 20px;
}

.archive-nav {
  margin: 0 0 34px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.archive-nav h2,
.month-heading {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

.archive-nav h2 {
  margin: 0 0 12px;
  font-size: 16px;
}

.archive-nav div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.archive-nav a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  text-decoration: none;
}

.archive-nav a:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.archive-nav span {
  color: var(--accent);
  font-weight: 700;
}

.blog-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto auto;
  gap: 14px;
  align-items: end;
  margin: 0 0 28px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.blog-tools label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.blog-tools input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.status-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.status-filter button {
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  background: #fff;
  color: var(--muted);
  font: 700 14px ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

.status-filter button.active,
.status-filter button:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.filter-count {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  text-align: right;
  white-space: nowrap;
}

.month-heading {
  margin: 30px 0 0;
  color: var(--muted);
  font-size: 15px;
  font-weight: 700;
  text-transform: uppercase;
}

.post-card a {
  display: grid;
  grid-template-columns: minmax(220px, 320px) 1fr;
  gap: 24px;
  align-items: center;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  text-decoration: none;
}

.post-card img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: 6px;
}

.post-placeholder {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 3;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #eef5f2;
  color: var(--accent);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 72px;
  font-weight: 700;
}

.status-pill {
  display: inline-block;
  margin-left: 10px;
  padding: 2px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--accent);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.draft-note {
  margin: 28px 0;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #eef5f2;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.draft-note p {
  margin: 0;
  font-size: 15px;
}

.post-card h2 {
  margin: 4px 0 8px;
}

.post-card p {
  margin: 0;
}

.article {
  max-width: 820px;
}

.article-header {
  padding-bottom: 28px;
  border-bottom: 1px solid var(--line);
}

.dek {
  max-width: 680px;
  color: var(--muted);
  font-size: 22px;
}

figure {
  margin: 28px 0;
}

figure img,
.image-grid img {
  border-radius: 8px;
  border: 1px solid var(--line);
  background: #eee8df;
}

figcaption,
.caption {
  margin-top: 9px;
}

.image-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 28px 0 8px;
}

.image-grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.image-grid img {
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.puzzle {
  margin: 26px 0;
  padding: 18px 20px;
  border-left: 4px solid var(--accent);
  background: #eef5f2;
}

.puzzle p {
  margin: 0 0 8px;
}

.puzzle p:last-child {
  margin-bottom: 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace;
  font-size: 0.95em;
}

.comments {
  margin-top: 54px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.comments-header {
  margin-bottom: 18px;
}

.comments-header h2 {
  margin: 0;
}

.comments-header span {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
}

.comment-list {
  display: grid;
  gap: 14px;
  margin-bottom: 24px;
}

.comment-thread {
  display: grid;
  gap: 10px;
}

.comment-item,
.admin-comment {
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.comment-replies {
  display: grid;
  gap: 10px;
  margin-left: 26px;
  padding-left: 14px;
  border-left: 2px solid var(--line);
}

.comment-reply {
  background: #fbfaf7;
}

.comment-item header,
.admin-comment header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 14px;
}

.comment-item strong,
.admin-comment strong {
  color: var(--text);
}

.comment-item p,
.admin-comment p {
  margin: 10px 0 0;
  font-size: 17px;
}

.comment-empty,
.comment-status,
.comment-reply-context {
  color: var(--muted);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
}

.comment-reply-context {
  margin: 0;
}

.comment-status[data-kind="success"] {
  color: var(--accent);
}

.comment-status[data-kind="error"] {
  color: #9b2c2c;
}

.comment-form,
.admin-token-form {
  display: grid;
  gap: 14px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.comment-form label,
.admin-token-form label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
}

.comment-form input,
.comment-form textarea,
.admin-token-form input {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 11px 12px;
  color: var(--text);
  background: #fff;
  font: inherit;
}

.comment-form textarea {
  resize: vertical;
}

.comment-form button,
.comment-reply-button,
.comment-cancel-reply,
.admin-token-form button,
.admin-toolbar button,
.admin-comment button {
  min-height: 42px;
  border: 1px solid var(--accent);
  border-radius: 6px;
  padding: 9px 13px;
  background: var(--accent);
  color: #fff;
  font: 700 14px ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  cursor: pointer;
}

.comment-form button:hover,
.comment-reply-button:hover,
.comment-cancel-reply:hover,
.admin-token-form button:hover,
.admin-toolbar button:hover,
.admin-comment button:hover {
  filter: brightness(0.95);
}

.comment-reply-button,
.comment-cancel-reply {
  min-height: 34px;
  margin-top: 10px;
  padding: 6px 10px;
  background: #fff;
  color: var(--accent);
}

.comment-cancel-reply {
  justify-self: start;
}

.comment-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.page-bottom-nav {
  display: flex;
  justify-content: center;
  margin-top: 44px;
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-bottom-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}

.page-bottom-nav a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.admin-comments h1 {
  font-size: clamp(42px, 8vw, 68px);
}

.admin-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 18px 0;
}

.admin-comment-list {
  display: grid;
  gap: 14px;
}

.admin-comment div {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.admin-comment button[data-action="hidden"],
.admin-comment button[data-action="pending"] {
  background: #fff;
  color: var(--accent);
}

.admin-comment button[data-action="delete"],
.admin-toolbar button[data-forget-token] {
  border-color: #9b2c2c;
  background: #9b2c2c;
}

@media (max-width: 720px) {
  .site-header {
    padding: 20px;
  }

  .page,
  .article {
    padding: 38px 20px 64px;
  }

  .post-card a,
  .image-grid,
  .image-grid.two,
  .blog-tools {
    grid-template-columns: 1fr;
  }

  .filter-count {
    text-align: left;
  }

  .comment-replies {
    margin-left: 10px;
    padding-left: 10px;
  }

  p,
  li {
    font-size: 18px;
  }
}
