:root {
  --bg: #0b0c14;
  --bg-elev: #12141f;
  --bg-soft: #181b29;
  --border: #2a2f42;
  --text: #e8eaf2;
  --muted: #9aa3b8;
  --accent: #2db58a;
  --accent-dim: #1f8f6a;
  --danger: #dc2626;
  --warn: #d97706;
  --radius: 2px;
  --font: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --mono: "IBM Plex Mono", "Cascadia Code", ui-monospace, monospace;
  --max: 1120px;
  --gap: 1rem;
}

[data-theme="light"] {
  --bg: #f4f5f8;
  --bg-elev: #ffffff;
  --bg-soft: #eef0f5;
  --border: #d5d9e4;
  --text: #12141f;
  --muted: #5b6478;
  --accent: #1f8f6a;
  --accent-dim: #176b50;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
code, pre { font-family: var(--mono); font-size: 0.9em; }
pre {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.9rem 1rem;
  overflow-x: auto;
}
.prose pre { margin: 1rem 0; }
.prose code {
  background: var(--bg-soft);
  padding: 0.1em 0.35em;
  border-radius: var(--radius);
}
.prose pre code { background: transparent; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1rem 0; }
.prose th, .prose td { border: 1px solid var(--border); padding: 0.45rem 0.6rem; text-align: left; }
.prose h2, .prose h3 { line-height: 1.25; text-wrap: balance; }

.wrap { width: min(100% - 2rem, var(--max)); margin-inline: auto; }
.site-header {
  border-bottom: 1px solid var(--border);
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: blur(8px);
  position: sticky; top: 0; z-index: 40;
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding: 0.85rem 0;
}
.brand {
  display: flex; align-items: baseline; gap: 0.45rem;
  color: var(--text); text-decoration: none; font-weight: 600;
  letter-spacing: -0.02em;
}
.brand span { color: var(--accent); font-family: var(--mono); font-weight: 500; font-size: 0.85em; }
.nav { display: flex; flex-wrap: wrap; gap: 0.85rem; align-items: center; }
.nav a { color: var(--muted); font-size: 0.92rem; text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 0.35rem; border: 1px solid var(--border); background: var(--bg-elev);
  color: var(--text); border-radius: var(--radius); padding: 0.45rem 0.75rem;
  font: inherit; cursor: pointer; min-height: 40px;
}
.btn:hover { border-color: var(--accent); color: var(--accent); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #04140f; font-weight: 600; }
.btn-primary:hover { background: var(--accent-dim); color: #fff; }
.icon-btn { width: 40px; padding: 0; }

.hero {
  padding: 2.4rem 0 1.6rem;
  border-bottom: 1px solid var(--border);
}
.hero-visual {
  position: relative;
  padding: 0;
  overflow: clip;
  min-height: clamp(280px, 42vw, 420px);
  display: grid;
  align-items: end;
}
.hero-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.hero-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.hero-copy {
  position: relative;
  z-index: 1;
  padding: 2.6rem 0 1.8rem;
  background: linear-gradient(180deg, transparent 0%, color-mix(in srgb, var(--bg) 55%, transparent) 35%, var(--bg) 100%);
}
.hero h1 {
  margin: 0 0 0.6rem; font-size: clamp(1.7rem, 3vw, 2.35rem);
  letter-spacing: -0.03em; line-height: 1.15; max-width: 18ch; text-wrap: balance;
}
.hero p { margin: 0; color: var(--muted); max-width: 52ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.1rem; }


.layout {
  display: grid; grid-template-columns: 1fr; gap: 1.5rem;
  padding: 1.5rem 0 3rem;
}
@media (min-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr) 280px; }
}

.card {
  background: var(--bg-elev); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1rem;
}
.card + .card { margin-top: 0.75rem; }
.card-cover {
  aspect-ratio: 16/7; background: linear-gradient(135deg, #142019, #0b0c14 55%, #1a2230);
  border: 1px solid var(--border); border-radius: var(--radius); margin: -0.15rem -0.15rem 0.75rem;
  display: grid; place-items: end start; padding: 0.75rem; color: #cfeadf;
  font-family: var(--mono); font-size: 0.78rem;
  overflow: hidden; text-decoration: none; color: inherit;
}
.card-cover--img {
  padding: 0;
  position: relative;
  place-items: stretch;
}
.card-cover--img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.card-cover-label {
  position: absolute;
  left: 0.75rem;
  bottom: 0.75rem;
  padding: 0.2rem 0.45rem;
  background: color-mix(in srgb, #04140f 72%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 35%, transparent);
  color: #cfeadf;
  font-family: var(--mono);
  font-size: 0.72rem;
}
[data-theme="light"] .card-cover {
  background: linear-gradient(135deg, #d7efe5, #eef0f5 60%, #dce4f5); color: #134;
}
[data-theme="light"] .card-cover-label {
  background: color-mix(in srgb, #fff 80%, transparent);
  color: #134;
  border-color: var(--border);
}
.article-cover {
  margin: 0 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 16/7;
}
.article-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.feed-guides {
  display: grid;
  gap: 0.85rem;
}
@media (min-width: 700px) {
  .feed-guides {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .feed-guides .card + .card { margin-top: 0; }
}
.feed-list { padding-bottom: 2.5rem; }

.meta { color: var(--muted); font-size: 0.82rem; display: flex; flex-wrap: wrap; gap: 0.55rem; }
.tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.55rem; }
.tag {
  font-family: var(--mono); font-size: 0.72rem; color: var(--accent);
  border: 1px solid color-mix(in srgb, var(--accent) 40%, var(--border));
  padding: 0.1rem 0.4rem; border-radius: var(--radius);
}
.section-title {
  margin: 0 0 0.85rem; font-size: 0.95rem; text-transform: uppercase;
  letter-spacing: 0.06em; color: var(--muted); font-weight: 600;
}
.side-block { margin-bottom: 1.25rem; }
.side-list { list-style: none; margin: 0; padding: 0; }
.side-list li { border-top: 1px solid var(--border); padding: 0.55rem 0; }
.side-list a { color: var(--text); }
.status-pill {
  font-family: var(--mono); font-size: 0.72rem; padding: 0.12rem 0.4rem;
  border: 1px solid var(--border); border-radius: var(--radius);
}
.status-pill.ok { color: var(--accent); border-color: color-mix(in srgb, var(--accent) 50%, var(--border)); }
.status-pill.wait { color: var(--warn); }

.feed { display: grid; gap: 0.85rem; }
.feed-item h2, .feed-item h3 { margin: 0 0 0.35rem; font-size: 1.05rem; line-height: 1.3; }
.feed-item h2 a, .feed-item h3 a { color: var(--text); text-decoration: none; }
.feed-item h2 a:hover, .feed-item h3 a:hover { color: var(--accent); }

.topic-row {
  display: grid; gap: 0.35rem; padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.topic-stats { display: flex; gap: 0.75rem; color: var(--muted); font-size: 0.82rem; font-family: var(--mono); }

.site-footer {
  border-top: 1px solid var(--border); padding: 1.5rem 0 2rem;
  color: var(--muted); font-size: 0.88rem;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 0.75rem 1.25rem; justify-content: space-between; }

.page-head { padding: 1.5rem 0 0.5rem; }
.page-head h1 { margin: 0 0 0.4rem; letter-spacing: -0.02em; }
.search {
  display: flex; gap: 0.5rem; margin: 1rem 0 1.25rem;
}
.search input {
  flex: 1; min-height: 40px; background: var(--bg-elev); border: 1px solid var(--border);
  color: var(--text); border-radius: var(--radius); padding: 0.45rem 0.7rem; font: inherit;
}

.article-layout { max-width: 72ch; padding: 1.25rem 0 3rem; }
.article-layout h1 { margin: 0 0 0.5rem; letter-spacing: -0.02em; text-wrap: balance; }

.endpoint {
  border: 1px solid var(--border); background: var(--bg-elev);
  border-radius: var(--radius); padding: 0.9rem 1rem; margin: 0.7rem 0;
}
.endpoint code { color: var(--accent); }
.avatar {
  width: 40px; height: 40px; border-radius: var(--radius); border: 1px solid var(--border);
}
.user-chip { display: flex; gap: 0.65rem; align-items: center; }
.muted { color: var(--muted); }
.filters { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.75rem 0 1rem; }
.filters a {
  border: 1px solid var(--border); padding: 0.25rem 0.55rem; border-radius: var(--radius);
  color: var(--muted); text-decoration: none; font-size: 0.85rem;
}
.filters a.active, .filters a:hover { color: var(--text); border-color: var(--accent); }

.post {
  border: 1px solid var(--border); background: var(--bg-elev);
  border-radius: var(--radius); padding: 1rem; margin: 0.75rem 0;
}
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
