:root {
  --bg: #080E1C;
  --bg-elev: #0D1628;
  --bg-card: #141C28;
  --bg-card-hover: #1a2436;
  --border: #262B37;
  --border-strong: #38445c;
  --text: #EAF0FA;
  --text-dim: #C8D6F0;
  --text-muted: #7E8DA8;
  --accent: #1A6BFF;
  --accent-soft: rgba(26, 107, 255, 0.14);
  --accent-dim: #1657cc;
  --accent-text: #7DA8FF;
  --p1: #f87171;
  --p2: #fb923c;
  --p3: #fbbf24;
  --p4: #60a5fa;
  --link: #5b9bff;
  --shadow-card: 0 1px 2px rgba(0,0,0,0.35);
  --shadow-card-hover: 0 2px 6px rgba(0,0,0,0.45), 0 10px 24px rgba(0,0,0,0.30);
  --radius: 10px;
  --radius-sm: 8px;
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, system-ui, sans-serif;
  font-size: 15.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 {
  font-family: 'Barlow Condensed', 'DM Sans', -apple-system, system-ui, sans-serif;
  font-weight: 600;
  color: #ffffff;
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: 0.005em;
}
h1 { font-size: 2.6rem; letter-spacing: 0; font-weight: 700; }
h2 { font-size: 1.7rem; margin-top: 2.2rem; font-weight: 600; }
h3 { font-size: 1.3rem; margin-top: 1.6rem; color: var(--text); font-weight: 600; }
p { margin: 0 0 1em; }
code, pre {
  font-family: 'DM Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.88em;
}
code {
  background: var(--bg-elev);
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  border: 1px solid var(--border);
}
pre {
  background: #060a10;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.85rem 1rem;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}
pre code { background: none; padding: 0; border: 0; }
.layout {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.header {
  border-bottom: 1px solid var(--border);
  background: linear-gradient(180deg, var(--bg-elev) 0%, var(--bg) 100%);
  padding: 1.2rem 0;
  margin-bottom: 2.2rem;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.01em;
  color: var(--text);
}
.brand:hover { text-decoration: none; }
.brand-mark {
  display: inline-block;
  width: 28px; height: 28px;
  background: var(--accent);
  color: #ffffff;
  border-radius: 8px;
  text-align: center;
  line-height: 28px;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
}
.brand-sub {
  color: var(--text-dim);
  font-weight: 400;
  font-size: 0.82rem;
  margin-left: 0.4rem;
}
/* Header search */
.header-inner { gap: 1.2rem; }
.brand { flex: 0 0 auto; }
.header-nav { flex: 0 0 auto; font-size: 0.9rem; color: var(--text-muted); }
.header-search {
  position: relative;
  flex: 1 1 320px;
  max-width: 520px;
  min-width: 0;
}
.header-search-icon {
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
}
.header-search input {
  width: 100%;
  padding: 0.6rem 0.85rem 0.6rem 2.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  color: var(--text);
  font-family: inherit;
  font-size: 0.92rem;
  line-height: 1.3;
  transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.header-search input::placeholder { color: var(--text-muted); }
.header-search input:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--bg-elev);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.header-search-results {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  right: 0;
  z-index: 50;
  max-height: 70vh;
  overflow-y: auto;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card-hover);
  padding: 0.35rem;
}
.kb-search-item {
  display: block;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background 0.1s;
}
.kb-search-item + .kb-search-item { margin-top: 0.15rem; }
.kb-search-item:hover,
.kb-search-item.is-active {
  background: var(--bg-card-hover);
  text-decoration: none;
}
.kb-search-item.is-active { box-shadow: inset 0 0 0 1px var(--border-strong); }
.kb-search-title {
  font-family: 'DM Sans', sans-serif;
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1.35;
  margin-bottom: 0.25rem;
  color: var(--text);
}
.kb-search-meta {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.3rem;
}
.kb-search-domain { color: var(--text-dim); }
.kb-search-summary {
  font-size: 0.85rem;
  color: var(--text-dim);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.kb-search-item mark {
  background: var(--accent-soft);
  color: var(--accent);
  padding: 0 0.1em;
  border-radius: 2px;
}
.kb-search-empty {
  padding: 0.9rem 0.85rem;
  color: var(--text-muted);
  font-size: 0.88rem;
  text-align: center;
}
@media (max-width: 720px) {
  .header-search { order: 3; flex-basis: 100%; max-width: none; }
  .header-nav { order: 2; }
}

.crumbs {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 1.2rem;
}
.crumbs a { color: var(--text-dim); }
.crumbs .sep { margin: 0 0.4rem; opacity: 0.5; }
.hero {
  margin-bottom: 2rem;
}
.hero-meta {
  display: flex; gap: 0.6rem; flex-wrap: wrap;
  margin-bottom: 0.8rem;
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 500;
}
.hero p.summary {
  color: var(--text-dim);
  font-size: 1.1rem;
  line-height: 1.6;
  max-width: 70ch;
}
.hero-bullets {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 0;
  display: grid;
  gap: 0.55rem;
  max-width: 70ch;
}
.hero-bullets li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--text-dim);
}
.hero-bullets li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--accent, #1A6BFF);
  font-weight: 700;
}
.search {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}
.search:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.domain-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
  margin: 1rem 0 2.5rem;
}
.domain-card {
  display: block;
  padding: 1.1rem 1.2rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, border-color 0.15s, background 0.15s, box-shadow 0.15s;
  position: relative;
  overflow: hidden;
}
.domain-card::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent-dim);
  opacity: 0.7;
  transition: opacity 0.15s, background 0.15s;
}
.domain-card:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-1px);
  text-decoration: none;
}
.domain-card:hover::before { background: var(--accent); opacity: 1; }
.domain-card h3 { margin: 0 0 0.4rem; font-size: 1rem; color: var(--text); font-weight: 600; }
.domain-card .count {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.5rem;
  font-weight: 500;
}
.domain-card p { margin: 0; color: var(--text-dim); font-size: 0.88rem; line-height: 1.55; }

/* Card-style article list */
.entry-list {
  list-style: none;
  padding: 0;
  margin: 0 0 2.5rem;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}
.entry-list li {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
  transition: transform 0.15s ease, border-color 0.15s, background 0.15s, box-shadow 0.15s;
  overflow: hidden;
}
.entry-list li:hover {
  border-color: var(--border-strong);
  background: var(--bg-card-hover);
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}
.entry-list a {
  display: block;
  color: var(--text);
  padding: 1.1rem 1.2rem 1.2rem;
  height: 100%;
}
.entry-list a:hover { text-decoration: none; }
.entry-list a:hover .entry-title { color: var(--accent); }
.entry-title {
  font-family: 'Barlow Condensed', sans-serif;
  font-weight: 600;
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
  line-height: 1.35;
  transition: color 0.15s;
}
.entry-list .summary {
  color: var(--text-dim);
  font-size: 0.9rem;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.entry-list .meta {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}
.sev {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  border: 1px solid currentColor;
  background: rgba(0,0,0,0.25);
  text-transform: uppercase;
}
.sev-P1 { color: var(--p1); }
.sev-P2 { color: var(--p2); }
.sev-P3 { color: var(--p3); }
.sev-P4 { color: var(--p4); }

/* Article body sections */
.section {
  margin: 1.4rem 0;
  padding: 1.2rem 1.4rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}
.section h2 {
  margin-top: 0;
  font-size: 0.78rem;
  color: var(--accent-text);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 600;
  font-family: 'DM Sans', sans-serif;
}
.bullets { padding-left: 1.2rem; margin: 0; }
.bullets li {
  margin-bottom: 0.55rem;
  color: var(--text);
  line-height: 1.6;
}
.bullets li::marker { color: var(--accent-dim); }
.bullets li strong { color: var(--text); font-weight: 600; }
.bullets li .purpose {
  color: var(--text-dim);
  font-size: 0.88em;
  margin-top: 0.15rem;
}
.steps {
  list-style: none;
  padding: 0;
  margin: 0;
  counter-reset: step;
}
.steps li {
  position: relative;
  padding: 0.7rem 0 0.8rem 2.4rem;
  border-bottom: 1px solid var(--border);
  counter-increment: step;
  line-height: 1.6;
}
.steps li:last-child { border-bottom: 0; padding-bottom: 0.2rem; }
.steps li::before {
  content: counter(step);
  position: absolute; left: 0; top: 0.75rem;
  width: 1.7rem; height: 1.7rem;
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-dim) 100%);
  color: #fff;
  border-radius: 50%;
  text-align: center;
  line-height: 1.7rem;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'DM Mono', monospace;
  box-shadow: 0 1px 3px rgba(0,0,0,0.4);
}
.steps .purpose { color: var(--text-dim); font-size: 0.88rem; margin-top: 0.3rem; }
.refs-list { padding-left: 1.2rem; margin: 0; }
.refs-list li { margin-bottom: 0.5rem; word-break: break-word; line-height: 1.5; }
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 1.2rem;
}
.tag {
  font-size: 0.72rem;
  padding: 0.2rem 0.6rem;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-dim);
  font-weight: 500;
}
.footer {
  border-top: 1px solid var(--border);
  padding: 2rem 0 3rem;
  margin-top: 3rem;
  color: var(--text-muted);
  font-size: 0.82rem;
}
.footer a { color: var(--text-dim); }
.header-nav { display: flex; align-items: center; gap: 1rem; }
.header-nav a { color: var(--text-dim); }
.header-cta {
  display: inline-block;
  padding: 0.5rem 0.9rem;
  background: var(--accent);
  color: #ffffff !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.85rem;
  white-space: nowrap;
  transition: background 0.15s;
}
.header-cta:hover { background: #1559d6; text-decoration: none; }
.kbd {
  font-family: 'DM Mono', monospace;
  padding: 0.1rem 0.4rem;
  border: 1px solid var(--border-strong);
  border-radius: 4px;
  background: var(--bg-elev);
  font-size: 0.8rem;
}
hr.div { border: 0; border-top: 1px solid var(--border); margin: 2rem 0; }
@media (max-width: 600px) {
  body { font-size: 15px; }
  h1 { font-size: 1.7rem; }
  .layout { padding: 0 1rem; }
  .entry-list { grid-template-columns: 1fr; }
  .section { padding: 1rem 1.1rem; }
}
