@font-face {
  font-family: "Avenir LT Pro 35 Light";
  src: url("../fonts/e5f78b4fb90a80a32be156470cbfead1.woff2") format("woff2"),
    url("../fonts/e5f78b4fb90a80a32be156470cbfead1.woff") format("woff"),
    url("../fonts/e5f78b4fb90a80a32be156470cbfead1.ttf") format("truetype");
}

* {
  box-sizing: border-box;
}

body {
  font-family: "Avenir LT Pro 35 Light", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #333;
  background: #fff;
  max-width: 700px;
  margin: 0 auto;
  padding: 20px;
}

nav {
  margin-bottom: 30px;
  font-size: 13px;
}

nav a {
  color: #2563EB;
  text-decoration: none;
}

nav a:hover {
  text-decoration: underline;
}

nav span {
  margin: 0 8px;
  color: #999;
}

article {
  margin-bottom: 40px;
}

h1 {
  font-size: 28px;
  font-weight: 600;
  margin-bottom: 8px;
  color: #111;
}

h2 {
  font-size: 22px;
  font-weight: 600;
  margin-top: 32px;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #e5e7eb;
  color: #222;
}

h3 {
  font-size: 18px;
  font-weight: 600;
  margin-top: 24px;
  margin-bottom: 8px;
  color: #222;
}

p {
  margin-bottom: 16px;
  color: #444;
}

time {
  font-size: 12px;
  color: #666;
}

a {
  color: #2563EB;
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

ul {
  margin-bottom: 16px;
  padding-left: 20px;
}

li {
  margin-bottom: 8px;
  color: #444;
}

code {
  background: #e5e7eb;
  color: #dc2626;
  padding: 2px 4px;
  border-radius: 3px;
  font-size: 13px;
  font-family: 'Courier New', monospace;
}

pre {
  background: #1f2937;
  color: #f3f4f6;
  padding: 12px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 16px 0;
  font-size: 12px;
}

pre code {
  background: transparent;
  color: inherit;
  padding: 0;
}

blockquote {
  border-left: 4px solid #3b82f6;
  padding-left: 12px;
  margin: 16px 0;
  font-style: italic;
  color: #666;
}

img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 16px 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

img.diagram-float {
  float: left;
  width: 55%;
  max-width: 400px;
  margin-right: 20px;
  margin-bottom: 12px;
  margin-top: 0;
  box-shadow: 0 2px 8px rgba(0,0,0,0);
}

.clear-float {
  clear: both;
}

#references {
  list-style: none;
  padding-left: 0;
}

#references li {
  padding-left: 20px;
  position: relative;
}

#references li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: #2563EB;
}

#grafana-screenshot {
  cursor: pointer;
  transition: transform 0.2s;
}

#grafana-screenshot:hover {
  transform: scale(1.01);
}

.lightbox-overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-image {
  max-width: 95%;
  max-height: 95%;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 40px rgba(0,0,0,0.5);
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 30px;
  color: white;
  font-size: 32px;
  font-weight: bold;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.5);
  border-radius: 50%;
  transition: background 0.2s;
}

.lightbox-close:hover {
  background: rgba(0, 0, 0, 0.8);
}

#scrollToTopBtn {
  display: none;
  position: fixed;
  bottom: 24px;
  right: 24px;
  background: #4f46e5;
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.2);
  transition: background 0.2s;
}

#scrollToTopBtn:hover {
  background: #4338ca;
}

#scrollToTopBtn svg {
  width: 20px;
  height: 20px;
}

@media (max-width: 640px) {
  body {
    padding: 16px;
  }

  img.diagram-float {
    float: none;
    width: 100%;
    max-width: 100%;
    margin-right: 0;
    margin-bottom: 16px;
  }
}

