/* Section pager readability */
.section-pager {
  right: max(24px, calc((100vw - 1440px) / 2));
  gap: 18px;
  transform: translate(118px, -50%);
}

.pager-link {
  min-width: 142px;
  gap: 11px;
  font-size: 11px;
  letter-spacing: 0.08em;
}

.pager-number {
  min-width: 20px;
  color: inherit;
  font-size: 12px;
  font-weight: 700;
}

.pager-label {
  min-width: 68px;
  color: #526075;
  text-align: right;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.12em;
  transition: color 180ms ease;
}

.pager-link i {
  width: 34px;
  height: 2px;
  border-radius: 999px;
}

.pager-link:hover .pager-label,
.pager-link.is-active .pager-label {
  color: var(--accent);
}

.pager-link.is-active i {
  width: 54px;
}

/* Intro action contact */
.action-separator {
  align-self: center;
  margin: 0 2px 0 4px;
  color: #364254;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 18px;
  line-height: 1;
}

.intro-email-text {
  align-self: center;
  color: #97a4b5;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  white-space: nowrap;
}

/* 04 — Grafana-inspired tools dashboard */
.tools-section {
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
  background:
    radial-gradient(circle at 72% 42%, rgba(255, 145, 0, 0.035), transparent 28%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.008), transparent 24%, transparent 76%, rgba(255, 255, 255, 0.008));
}

.tools-layout {
  flex: 1;
  display: grid;
  grid-template-columns: minmax(240px, 0.34fr) minmax(680px, 1fr);
  align-items: center;
  gap: 48px;
}

.tools-heading h2 {
  margin: 0;
  font-size: clamp(40px, 4vw, 62px);
  line-height: 1.02;
  letter-spacing: -0.05em;
}

.tools-heading > p:not(.section-kicker) {
  max-width: 430px;
  margin: 24px 0 0;
  color: #7f8b9d;
  font-size: 14px;
  line-height: 1.8;
  word-break: keep-all;
}

.grafana-dashboard {
  overflow: hidden;
  border: 1px solid rgba(148, 163, 184, 0.16);
  border-radius: 16px;
  background: #0b111a;
  box-shadow: 0 26px 80px rgba(0, 0, 0, 0.38);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.dashboard-topbar {
  min-height: 66px;
  padding: 0 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  background: linear-gradient(180deg, #131b27, #101722);
}

.dashboard-topbar > div {
  display: grid;
  gap: 5px;
}

.dashboard-breadcrumb,
.metric-label,
.metric-caption,
.service-panel-head,
.service-health,
.dashboard-range,
.service-metric-head,
.metric-live-dot {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

.dashboard-breadcrumb {
  color: #657286;
  font-size: 9px;
  letter-spacing: 0.13em;
}

.dashboard-topbar strong {
  color: #d9e1eb;
  font-size: 13px;
  letter-spacing: 0.01em;
}

.dashboard-range,
.service-health,
.metric-healthy {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.dashboard-range {
  color: #758296;
  font-size: 10px;
  white-space: nowrap;
}

.dashboard-range i,
.service-health i,
.metric-healthy i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent-strong);
  box-shadow: 0 0 10px rgba(55, 217, 170, 0.55);
}

.dashboard-stats {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.055);
  background: rgba(255, 255, 255, 0.012);
}

.metric-panel {
  min-height: 112px;
  padding: 15px 16px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(20, 28, 40, 0.96), rgba(13, 19, 29, 0.96));
}

.metric-label {
  color: #657286;
  font-size: 9px;
  letter-spacing: 0.14em;
}

.metric-panel strong {
  color: #e1e7ef;
  font-size: 22px;
  font-weight: 650;
  letter-spacing: -0.03em;
}

.metric-panel .metric-healthy {
  color: var(--accent);
  font-size: 17px;
  letter-spacing: -0.02em;
}

.metric-caption {
  color: #566377;
  font-size: 9px;
}

.metric-stream-panel {
  gap: 8px;
}

.metric-stream-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.metric-live-dot {
  color: var(--accent);
  font-size: 8px;
  letter-spacing: 0.1em;
}

.overview-metric-chart,
.service-metric-chart {
  width: 100%;
  overflow: visible;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.025) 1px, transparent 1px);
  background-size: 100% 13px, 34px 100%;
}

.overview-metric-chart {
  height: 42px;
}

.overview-metric-line,
.service-metric-line {
  fill: none;
  stroke: var(--accent);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
  filter: drop-shadow(0 0 4px rgba(110, 231, 199, 0.28));
  transition: points 520ms ease;
}

.services-grid {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.service-panel {
  min-width: 0;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  background: linear-gradient(180deg, #111926, #0e151f);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.service-panel:hover {
  transform: translateY(-3px);
  border-color: rgba(110, 231, 199, 0.28);
  box-shadow: 0 16px 35px rgba(0, 0, 0, 0.24), 0 0 0 1px rgba(110, 231, 199, 0.04);
}

.service-panel-head {
  min-height: 38px;
  padding: 0 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  color: #667487;
  font-size: 8.5px;
  letter-spacing: 0.1em;
}

.service-open {
  color: #718096;
  transition: color 180ms ease;
}

.service-panel:hover .service-open {
  color: var(--accent);
}

.service-panel-body {
  min-height: 242px;
  padding: 17px 15px 15px;
  display: flex;
  flex-direction: column;
}

.service-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.service-title-row h3 {
  margin: 0;
  color: #e1e7ef;
  font-size: 18px;
  letter-spacing: -0.025em;
}

.service-health {
  color: var(--accent);
  font-size: 8.5px;
  white-space: nowrap;
}

.service-health i {
  width: 6px;
  height: 6px;
}

.service-panel-body p {
  margin: 15px 0 12px;
  min-height: 41px;
  color: #7d899b;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 1.7;
  word-break: keep-all;
}

.service-metric {
  margin: 2px 0 14px;
  padding: 9px 10px 7px;
  border: 1px solid rgba(255, 255, 255, 0.055);
  border-radius: 6px;
  background: rgba(4, 9, 15, 0.34);
}

.service-metric-head {
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: #5f6d80;
  font-size: 7.5px;
  letter-spacing: 0.11em;
}

.service-metric-head span:last-child {
  color: rgba(110, 231, 199, 0.72);
}

.service-metric-chart {
  height: 46px;
}

.service-metric-point {
  fill: var(--accent);
  filter: drop-shadow(0 0 4px rgba(110, 231, 199, 0.7));
  transition: cx 520ms ease, cy 520ms ease;
}

.service-tags {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.service-tags span {
  padding: 5px 7px;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.02);
  color: #69778a;
  font-size: 8.5px;
}

.tools-footer {
  position: static !important;
  flex: 0 0 auto;
  width: min(1220px, calc(100% - 48px));
  margin: 0 auto;
}

@media (max-width: 1320px) {
  .section-pager {
    transform: translate(86px, -50%);
  }

  .tools-layout {
    grid-template-columns: minmax(220px, 0.28fr) minmax(620px, 1fr);
    gap: 36px;
  }
}

@media (max-width: 1180px) {
  .section-pager {
    right: 14px;
    transform: translate(46px, -50%);
  }

  .pager-link { min-width: 70px; }
  .pager-label { display: none; }
  .pager-link i { width: 28px; }
  .pager-link.is-active i { width: 44px; }
  .action-separator { margin-left: 0; }

  .tools-layout {
    grid-template-columns: 1fr;
    gap: 30px;
    align-content: center;
  }

  .tools-heading > p:not(.section-kicker) { max-width: 680px; }
}

@media (max-width: 900px) {
  .dashboard-stats,
  .services-grid {
    grid-template-columns: 1fr;
  }

  .metric-panel { min-height: 92px; }
  .service-panel-body { min-height: 230px; }
}

@media (max-width: 760px) {
  .section-pager { display: none; }
  .action-separator { display: none; }

  .intro-email-text {
    flex-basis: 100%;
    margin-top: 4px;
    font-size: 12px;
  }

  .tools-layout {
    padding-top: 110px;
    padding-bottom: 56px;
  }

  .tools-heading h2 { font-size: clamp(38px, 11vw, 54px); }

  .dashboard-topbar {
    min-height: 74px;
    align-items: flex-start;
    padding: 15px;
  }

  .dashboard-range { margin-top: 3px; }
  .dashboard-stats,
  .services-grid { padding: 10px; }
  .tools-footer { width: min(100% - 32px, 1220px); }
}
