:root {
  --max: 980px;
  --pad: 16px;
  font-synthesis-weight: none;
}

body {
  font-family: ui-sans-serif, system-ui, Segoe UI, Roboto, Helvetica, Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  color: #111;
  background: #fff;
}

header,
main,
footer {
  max-width: var(--max);
  padding: 0 var(--pad);
  margin-inline: auto;
}

header {
  display: flex;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  padding-top: 20px;
  padding-bottom: 10px;
}

nav a {
  margin-right: 12px;
  text-decoration: none;
  color: #0b57d0;
}

a:hover {
  text-decoration: underline;
}

.grid {
  display: grid;
  gap: 16px;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 16px;
}

.card {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 16px;
  background: #fafafa;
}

.card-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.muted {
  color: #6b7280;
}

.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #3730a3;
  font-size: 12px;
}

.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #fff;
}

footer {
  padding: 40px 0;
  color: #6b7280;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.section-title .actions a {
  margin-left: 8px;
}

.post-layout {
  gap: 32px;
  margin-top: 24px;
}

.post-viewer {
  gap: 16px;
}

.post-list .card {
  transition: box-shadow 0.2s ease;
}

.post-list .card:hover {
  box-shadow: 0 4px 20px rgba(15, 23, 42, 0.1);
}

.post-list .card[data-active="true"] {
  border-color: #6366f1;
  box-shadow: 0 0 0 2px rgba(99, 102, 241, 0.15);
}

.post-body {
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  padding: 24px;
  background: #fff;
  line-height: 1.7;
}

.post-body > *:first-child {
  margin-top: 0;
}

.post-body h1,
.post-body h2,
.post-body h3,
.post-body h4,
.post-body h5,
.post-body h6 {
  margin-top: 32px;
  margin-bottom: 16px;
  line-height: 1.3;
}

.post-body p {
  margin: 0 0 16px;
}

.post-body ul,
.post-body ol {
  margin: 0 0 16px 0;
  padding-left: 24px;
}

.post-body li {
  margin-bottom: 8px;
}

.post-body hr {
  border: none;
  border-top: 1px solid #e5e7eb;
  margin: 32px 0;
}

.post-body code {
  background: #f4f4f5;
  padding: 2px 4px;
  border-radius: 4px;
  font-family: ui-monospace, SFMono-Regular, SFMono, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 0.95em;
}

@media (max-width: 900px) {
  .post-layout {
    gap: 24px;
  }
}
