:root {
  color-scheme: dark;
  --bg: #090909;
  --panel: #151515;
  --panel-2: #1e1e1e;
  --line: #2b2b2b;
  --text: #f4f4f4;
  --muted: #a7a7a7;
  --red: #e43d3d;
  --red-bg: rgba(228, 61, 61, 0.14);
  --yellow: #f0c241;
  --yellow-bg: rgba(240, 194, 65, 0.14);
  --gray-bg: #282828;
}

* {
  box-sizing: border-box;
}

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

a {
  color: inherit;
  text-decoration: none;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 72px;
  padding: 14px clamp(18px, 4vw, 48px);
  background: rgba(9, 9, 9, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(10px);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(228, 61, 61, 0.5);
  border-radius: 50%;
  background: #111;
  color: var(--red);
  font-weight: 800;
  letter-spacing: 0;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  font-size: 20px;
  line-height: 1.1;
}

.brand small {
  color: var(--muted);
  font-size: 12px;
}

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

.top-nav a:hover {
  color: var(--text);
}

.shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 42px 0 64px;
}

.intro {
  max-width: 760px;
  padding-bottom: 28px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--red);
  font-size: 13px;
  font-weight: 700;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(34px, 5vw, 60px);
  line-height: 1.05;
  letter-spacing: 0;
}

.intro p:not(.eyebrow),
.muted {
  color: var(--muted);
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 18px 0 30px;
  border-top: 1px solid var(--line);
}

.filter-btn {
  appearance: none;
  min-height: 38px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.filter-btn:hover,
.filter-btn.is-active {
  border-color: rgba(228, 61, 61, 0.75);
  color: var(--text);
  background: var(--red-bg);
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.section-head h2 {
  margin: 0;
  font-size: 20px;
}

.section-head span {
  color: var(--muted);
}

.post-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.post-card,
.detail-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}

.post-card {
  display: flex;
  flex-direction: column;
  min-height: 280px;
  padding: 18px;
}

.post-card:hover {
  border-color: rgba(228, 61, 61, 0.65);
  background: var(--panel-2);
}

.post-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

time {
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.category,
.tag {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  max-width: 100%;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 1.35;
}

.category.risk {
  background: var(--red-bg);
  color: #ff8b8b;
}

.category.warning {
  background: var(--yellow-bg);
  color: var(--yellow);
}

.category.neutral,
.tag {
  background: var(--gray-bg);
  color: #d6d6d6;
}

.post-card h3 {
  margin-bottom: 10px;
  font-size: 20px;
  line-height: 1.35;
}

.post-card p {
  color: #d2d2d2;
  font-size: 14px;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: auto;
  padding-top: 12px;
}

.read-more {
  margin-top: 16px;
  color: var(--red);
  font-size: 14px;
  font-weight: 700;
}

.empty {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--muted);
}

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
}

.page-numbers {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
}

.page-btn {
  appearance: none;
  min-width: 42px;
  min-height: 38px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  color: var(--muted);
  font: inherit;
  cursor: pointer;
}

.page-btn:hover:not(:disabled),
.page-btn.is-active {
  border-color: rgba(228, 61, 61, 0.75);
  color: var(--text);
  background: var(--red-bg);
}

.page-btn:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.detail-shell {
  max-width: 860px;
}

.back-link,
.primary-link {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  margin-bottom: 16px;
  color: var(--muted);
}

.back-link:hover,
.primary-link:hover {
  color: var(--text);
}

.detail-card {
  padding: clamp(22px, 4vw, 42px);
}

.detail-card h1 {
  font-size: clamp(30px, 4vw, 48px);
}

.content-body {
  margin: 26px 0 22px;
  padding: 22px;
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #0d0d0d;
  color: var(--text);
  font: inherit;
  white-space: pre-wrap;
}

@media (max-width: 900px) {
  .post-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .shell {
    width: min(100% - 24px, 1120px);
    padding-top: 30px;
  }

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

  .post-meta {
    align-items: flex-start;
    flex-direction: column;
  }

  .pagination {
    align-items: stretch;
    flex-direction: column;
  }
}
