* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17.5px;
  line-height: 1.428571429;
  color: #333;
  background-color: #fff;
}
a { color: #428bca; text-decoration: none; }
a:hover, a:focus { color: #2a6496; text-decoration: underline; }

/* ---------- Top navigation (sticky) ---------- */
.top-nav {
  background-color: #f8f8f8;
  border-bottom: 1px solid #e7e7e7;
  padding: 10px 20px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: 16px;
  row-gap: 6px;
  position: sticky;
  top: 0;
  z-index: 1000;
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}
.brand {
  grid-column: 1;
  grid-row: 1 / span 2;
  align-self: center;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #777;
  font-size: 24px;
  font-weight: 500;
  text-decoration: none;
}
.brand:hover { color: #5e5e5e; text-decoration: none; }
.brand svg, .brand img { height: 60px; width: auto; display: block; }
.menu { grid-column: 2; grid-row: 2; display: flex; gap: 2px; flex-wrap: wrap; }
.menu a {
  padding: 6px 14px;
  color: #428bca;
  text-decoration: none;
  border-radius: 4px;
  font-size: 14px;
  line-height: 1.428571429;
}
.menu a:hover { background-color: #eee; text-decoration: none; }
.menu a.active {
  background-color: #fff;
  color: #555;
  border: 1px solid #ddd;
  padding: 5px 13px;
  cursor: default;
}
.contact { grid-column: 3; grid-row: 1 / span 2; align-self: center; justify-self: end; color: #555; font-size: 14px; white-space: nowrap; }
.contact a { color: #555; }

/* ---------- Page-top strip (breadcrumb + download) ---------- */
.page-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}
.page-top .breadcrumb { margin-bottom: 0; }

/* ---------- Main content ---------- */
.content { max-width: 960px; margin: 0 auto; padding: 20px 30px 40px; }
.breadcrumb { color: #777; font-size: 13px; margin-bottom: 20px; }
.breadcrumb a { color: #428bca; }

h1, h2, h3, h4 {
  font-family: inherit;
  font-weight: 500;
  line-height: 1.1;
  color: inherit;
  margin-top: 30px;
  margin-bottom: 14px;
}
h1 { font-size: 36px; margin-top: 20px; padding-bottom: 9px; border-bottom: 1px solid #eee; }
h2 { font-size: 24px; padding-bottom: 6px; border-bottom: 1px solid #eee; }
h3 { font-size: 18px; }
h4 { font-size: 16px; }

.anchor { color: #ccc; font-weight: normal; text-decoration: none; margin-right: 6px; }
.anchor:hover { color: #428bca; text-decoration: none; }

p { margin: 0 0 12px; }

code {
  font-family: Menlo, Monaco, Consolas, "Courier New", monospace;
  font-size: 90%;
  color: #c7254e;
  background-color: #f9f2f4;
  padding: 2px 4px;
  border-radius: 3px;
}

/* ---------- Grey instruction boxes (perldoc <pre> look) ---------- */
.note, pre {
  display: block;
  padding: 12px 16px;
  margin: 16px 0;
  font-size: 16px;
  line-height: 1.428571429;
  color: #333;
  background-color: #f5f5f5;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow-x: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
}
pre { font-family: Menlo, Monaco, Consolas, "Courier New", monospace; font-size: 15px; }
pre code { padding: 0; background: transparent; color: inherit; font-size: inherit; border-radius: 0; }
.note p:last-child { margin-bottom: 0; }

/* ---------- Image figures ---------- */
figure { margin: 20px 0; text-align: center; }
figure img { max-width: 100%; height: auto; border: 1px solid #ddd; border-radius: 4px; padding: 4px; background: #fff; }
figcaption { font-size: 12px; color: #777; margin-top: 6px; font-style: italic; }
.placeholder-img {
  display: block;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 60px 20px;
  text-align: center;
  color: #999;
  background: #fafafa;
  border: 1px dashed #ccc;
  border-radius: 4px;
  font-style: italic;
}

/* ---------- Download button ---------- */
.download {
  display: inline-block;
  padding: 8px 16px;
  background-color: #428bca;
  color: #fff !important;
  border-radius: 4px;
  font-weight: 500;
  text-decoration: none;
  font-size: 14px;
  white-space: nowrap;
  min-width: 180px;
  text-align: center;
}
.download:hover { background-color: #3071a9; text-decoration: none; }
.download.sm { padding: 6px 12px; font-size: 13px; }

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid #e7e7e7;
  background-color: #f8f8f8;
  padding: 16px 20px;
  margin-top: 40px;
  text-align: center;
  font-size: 13px;
  color: #777;
}
footer .menu { justify-content: center; padding-left: 0; margin-bottom: 8px; }
footer .copy { color: #999; }