:root {
  color-scheme: light;
  --bg: #fbfaf7;
  --paper: #fffefa;
  --text: #262420;
  --muted: #6f6a61;
  --line: #e5e0d7;
  --accent: #1f6f66;
  --accent-soft: #d9ebe7;
  --ink-soft: #f1eee8;
  --shadow: 0 12px 30px rgb(49 45 38 / 8%);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family:
    ui-sans-serif,
    system-ui,
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    sans-serif;
  line-height: 1.72;
}

a {
  color: inherit;
}

.page {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.site-header {
  padding: 72px 0 28px;
}

.eyebrow,
.category {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: 0;
}

h1 {
  margin: 0 0 20px;
  font-size: clamp(36px, 7vw, 56px);
  line-height: 1.08;
  font-weight: 760;
  letter-spacing: 0;
}

.intro {
  max-width: 760px;
  margin: 0;
  color: #4e4941;
  font-size: 17px;
}

.toolbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 14px 0;
  margin: 16px 0 20px;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.filter {
  min-height: 34px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: #49443d;
  flex: 0 1 auto;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
  white-space: nowrap;
}

.filter:hover,
.filter.is-active {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: #154d47;
}

.recommendations {
  padding-bottom: 72px;
}

.update {
  margin-top: 36px;
}

.update h2 {
  margin: 0 0 24px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
  font-size: 22px;
  line-height: 1.25;
  letter-spacing: 0;
}

.items {
  display: grid;
  gap: 36px;
}

.item {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr) minmax(300px, 360px);
  gap: 18px;
  scroll-margin-top: 92px;
}

.item-anchor {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  text-decoration: none;
  font-size: 12px;
  line-height: 1;
  background: var(--paper);
}

.item-anchor:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.item-body {
  min-width: 0;
}

.item-heading {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 14px;
}

.item h3 {
  margin: 0;
  font-size: 24px;
  line-height: 1.32;
  font-weight: 720;
  letter-spacing: 0;
}

.tag {
  padding: 4px 8px;
  border-radius: 6px;
  background: #203b38;
  color: #fffdfa;
  font-size: 12px;
  line-height: 1.3;
}

.tags {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 6px;
  max-width: 220px;
  margin-top: 2px;
}

.content img {
  width: 100%;
  max-height: 420px;
  display: block;
  object-fit: contain;
  margin: 14px 0 18px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow);
}

.content::after {
  content: "";
  display: block;
  clear: both;
}

.content p,
.content li {
  font-size: 16px;
}

.content p {
  margin: 0 0 12px;
}

.content ul,
.content ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.content a {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  width: fit-content;
  max-width: 100%;
  padding: 0 12px;
  margin: 2px 4px 2px 0;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  color: #245f58;
  text-decoration: none;
  font-size: 14px;
}

.content a::before {
  content: "";
  width: 15px;
  height: 15px;
  flex: 0 0 15px;
  background: currentColor;
  mask:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='8' cy='21' r='1'/%3E%3Ccircle cx='19' cy='21' r='1'/%3E%3Cpath d='M2.05 2.05h2l2.66 12.42a2 2 0 0 0 2 1.58h9.78a2 2 0 0 0 1.95-1.57l1.65-7.43H5.12'/%3E%3C/svg%3E")
    center / contain no-repeat;
}

.content a:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.content h4,
.content h5 {
  margin: 18px 0 8px;
  font-size: 17px;
  line-height: 1.35;
}

.load-error {
  color: #8c2d23;
}

.comment-panel {
  min-width: 0;
  align-self: start;
  position: sticky;
  top: 120px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
}

.comment-panel-heading {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.2;
}

.comment-target {
  min-height: 96px;
}

.comment-loading {
  min-height: 96px;
  display: grid;
  place-items: center;
  border: 1px dashed #cfc7ba;
  border-radius: 8px;
  background: #fffdf8;
  color: var(--muted);
  font-size: 13px;
}

.comment-empty {
  padding: 14px;
  border: 1px dashed #cfc7ba;
  border-radius: 8px;
  background: #fffdf8;
  color: #5e584f;
  font-size: 14px;
}

.comment-empty strong {
  display: block;
  color: var(--text);
}

.comment-empty p {
  margin: 6px 0 0;
}

.mini-comments {
  display: grid;
  max-height: 340px;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
}

.mini-comments.is-collapsed {
  cursor: pointer;
  outline: none;
}

.mini-comments.is-collapsed:hover,
.mini-comments.is-collapsed:focus-visible {
  border-color: var(--accent);
  background: #f5fbf8;
}

.mini-comment-list {
  display: grid;
  gap: 0;
}

.mini-comment-empty {
  padding: 14px 16px;
  color: var(--muted);
  font-size: 13px;
}

.mini-comment {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  padding: 14px 16px;
}

.mini-comment + .mini-comment {
  border-top: 1px solid var(--line);
}

.mini-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
}

.mini-avatar-fallback {
  display: grid;
  place-items: center;
  background: #ffd34d;
  color: #262420;
  font-size: 14px;
  font-weight: 700;
}

.mini-comment-body {
  min-width: 0;
}

.mini-comment-meta {
  display: flex;
  gap: 8px;
  align-items: baseline;
  margin-bottom: 5px;
}

.mini-comment-meta strong {
  font-size: 14px;
  line-height: 1.2;
}

.mini-comment-meta time {
  color: var(--muted);
  font-size: 13px;
}

.mini-comment p {
  margin: 0;
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
}

.mini-login {
  width: 100%;
  min-height: 38px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: #245f58;
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}

.mini-login:hover {
  background: var(--accent-soft);
}

.mini-composer {
  display: grid;
  gap: 8px;
  padding: 12px 16px 14px;
  border-top: 1px solid var(--line);
  background: transparent;
}

.mini-composer-user {
  display: flex;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
}

.mini-composer-user .mini-avatar {
  width: 24px;
  height: 24px;
}

.mini-composer-user button {
  margin-left: auto;
  border: 0;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}

.mini-composer textarea {
  width: 100%;
  min-height: 58px;
  resize: vertical;
  border: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.55;
  outline: none;
}

.mini-composer button[type="submit"] {
  justify-self: end;
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--accent);
  border-radius: 7px;
  background: var(--accent);
  color: #fffefa;
  font: inherit;
  font-size: 13px;
  cursor: pointer;
}

code {
  padding: 1px 5px;
  border-radius: 5px;
  background: var(--ink-soft);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
}

.site-footer {
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 14px;
}

.site-footer p {
  margin: 0;
}

@media (min-width: 900px) {
  .content img {
    float: right;
    width: min(34%, 240px);
    max-height: 260px;
    margin: 2px 0 14px 20px;
  }
}

@media (max-width: 640px) {
  .page {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    padding-top: 48px;
  }

  .item {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .item-anchor {
    width: auto;
    height: auto;
    place-items: start;
    border: 0;
    border-radius: 0;
    background: transparent;
  }

  .item-heading {
    display: block;
  }

  .tags {
    justify-content: flex-start;
    max-width: none;
    margin-top: 10px;
  }

  .content img {
    float: none;
    width: 100%;
    max-height: 300px;
    margin: 14px 0 18px;
  }

  .comment-panel {
    position: static;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 12px;
  }
}
