:root {
  --bg: #02070c;
  --panel: rgba(2, 12, 20, 0.88);
  --panel-strong: rgba(3, 18, 30, 0.94);
  --line: rgba(0, 205, 255, 0.42);
  --line-soft: rgba(0, 205, 255, 0.18);
  --cyan: #19d8ff;
  --cyan-soft: #8eeaff;
  --text: #f2f7fb;
  --muted: #b6c9d6;
  --dim: #7893a4;
  --accent: #ff5a2f;
  --max: 1320px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  min-height: 100%;
  color: var(--text);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  line-height: 1.65;
  background:
    radial-gradient(circle at 68% 5%, rgba(0, 172, 255, 0.24), transparent 34rem),
    radial-gradient(circle at 18% 18%, rgba(0, 96, 150, 0.20), transparent 28rem),
    linear-gradient(90deg, rgba(0, 0, 0, 0.82), rgba(0, 10, 18, 0.90)),
    url("../brand/coldwire-bg.jpg");
  background-size: cover;
  background-attachment: fixed;
  background-position: center;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(rgba(255,255,255,0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.014) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.55;
}

.site-shell {
  width: min(var(--max), calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0 64px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(1, 9, 16, 0.78);
  box-shadow:
    0 0 28px rgba(0, 190, 255, 0.10),
    inset 0 0 24px rgba(0, 190, 255, 0.04);
}

.brand-mark {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.brand-kicker {
  color: var(--cyan);
  font-size: 0.72rem;
  font-weight: 700;
}

.brand-title {
  font-size: 0.95rem;
  font-weight: 800;
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.site-nav a {
  color: var(--cyan-soft);
  text-decoration: none;
  font-size: 0.82rem;
  padding: 7px 10px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: rgba(0, 190, 255, 0.05);
}

.site-nav a:hover {
  color: #fff;
  border-color: var(--cyan);
  box-shadow: 0 0 18px rgba(0, 210, 255, 0.18);
}

.content-panel {
  position: relative;
  overflow: hidden;
  padding: 30px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background:
    linear-gradient(180deg, rgba(3, 18, 30, 0.90), rgba(1, 8, 14, 0.96));
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.46),
    0 0 42px rgba(0, 190, 255, 0.10),
    inset 0 0 42px rgba(0, 190, 255, 0.035);
}

.content-panel img {
  max-width: 100%;
  height: auto;
}

/* Top Pages hero: docs/index.md wraps the hero in <p align="center">. */
.content-panel > p[align="center"]:first-child {
  margin: -30px -30px 34px;
  padding: 0;
  line-height: 0;
}

.content-panel > p[align="center"]:first-child img[src*="hero"] {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  margin: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 20px 20px 8px 8px;
}

h1, h2, h3, h4 {
  line-height: 1.2;
  color: var(--text);
  letter-spacing: 0.02em;
}

h1 {
  margin-top: 0;
  font-size: clamp(2rem, 4.3vw, 3.25rem);
  color: #ffffff;
  text-shadow: 0 0 18px rgba(0, 210, 255, 0.25);
}

h2 {
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-soft);
  color: var(--cyan-soft);
}

h3 {
  margin-top: 2rem;
  color: var(--cyan);
}

p, li {
  color: var(--text);
}

em {
  color: var(--muted);
}

strong {
  color: #fff;
}

a {
  color: var(--cyan);
  text-underline-offset: 0.18em;
}

a:hover {
  color: #fff;
}

blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  border-left: 3px solid var(--cyan);
  border-radius: 0 12px 12px 0;
  background: rgba(0, 205, 255, 0.07);
}

blockquote p {
  margin: 0;
  color: #e9f8ff;
}

hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--line-soft);
}

code {
  color: #d7f7ff;
  background: rgba(0, 205, 255, 0.10);
  border: 1px solid rgba(0, 205, 255, 0.16);
  border-radius: 6px;
  padding: 0.12em 0.34em;
}

pre {
  overflow-x: auto;
  padding: 1rem;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.42);
}

pre code {
  padding: 0;
  border: 0;
  background: transparent;
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4rem 0;
  background: rgba(0, 0, 0, 0.22);
}

th, td {
  border: 1px solid var(--line-soft);
  padding: 0.75rem;
  vertical-align: top;
}

th {
  color: var(--cyan-soft);
  background: rgba(0, 205, 255, 0.08);
}

ul, ol {
  padding-left: 1.4rem;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 24px;
  padding: 14px 4px;
  color: var(--dim);
  font-size: 0.78rem;
  border-top: 1px solid var(--line-soft);
}

@media (max-width: 760px) {
  .site-shell {
    width: min(100% - 18px, var(--max));
    padding-top: 12px;
  }

  .site-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .content-panel {
    padding: 18px;
    border-radius: 16px;
  }

  .content-panel img[src*="hero"] {
    width: calc(100% + 36px);
    margin: -18px -18px 24px;
    border-radius: 16px 16px 8px 8px;
  }

  .site-footer {
    flex-direction: column;
  }
}