/* ============================================================
   DEVELOPERS PAGE — upstream-edge Python library (Dark Redesign)
   Section-specific styling layered on global_dark.css.
   ============================================================ */

.dev-page { overflow-x: clip; }

/* The final section uses the dev-section-alt gradient (light bottom edge).
   The global footer adds a 32px top margin above its own border-top, which
   left a dark gap between the gradient edge and the footer line — reading as
   two misaligned separators. Collapse that margin (this page only) so the
   footer's border-top is the single, flush divider. */
.dev-page + .footer { margin-top: 0; }

/* ============================================================
   HERO
   ============================================================ */
.dev-hero {
  position: relative;
  padding: var(--space-9) 0 var(--space-8);
  overflow: hidden;
}

.dev-hero::before {
  content: '';
  position: absolute;
  top: -280px;
  left: 50%;
  transform: translateX(-50%);
  width: 1000px;
  height: 800px;
  background: radial-gradient(
    ellipse at center,
    rgba(99, 102, 241, 0.16) 0%,
    rgba(34, 211, 238, 0.05) 30%,
    transparent 70%
  );
  pointer-events: none;
  z-index: 0;
}

.dev-hero-inner {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.dev-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 14px;
  margin-bottom: var(--space-5);
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  border: 1px solid rgba(34, 211, 238, 0.25);
  color: var(--accent);
  font-size: 13px;
  font-weight: 500;
}
.dev-badge .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 8px var(--accent);
}

.dev-hero-title {
  font-size: clamp(34px, 5vw, 52px);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.08;
  margin: 0 0 var(--space-5);
  max-width: 820px;
}

.dev-hero-lede {
  font-size: clamp(17px, 1.6vw, 19px);
  line-height: 1.6;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 0 var(--space-6);
}

.dev-pkg {
  font-family: var(--font-mono);
  color: var(--accent);
  font-weight: 500;
}

.dev-install {
  width: 100%;
  max-width: 420px;
  margin-bottom: var(--space-6);
}

.dev-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  justify-content: center;
  margin-bottom: var(--space-5);
}

.dev-meta-row {
  font-size: 13px;
  color: var(--text-dim);
  margin: 0;
}

/* ============================================================
   CODE BLOCKS
   ============================================================ */
.dev-code {
  font-family: var(--font-mono);
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-5);
  margin: 0;
  overflow-x: auto;
  text-align: left;
  -webkit-overflow-scrolling: touch;
}
.dev-code code {
  font-family: inherit;
  white-space: pre;
}

/* Centered single-line install command in the hero */
.dev-code-inline {
  text-align: center;
  color: var(--accent);
}
.dev-code-inline code { white-space: nowrap; }

/* Inline code within prose */
.dev-page code:not(.dev-code code) {
  font-family: var(--font-mono);
  font-size: 0.88em;
  color: var(--accent);
  background: var(--accent-soft);
  padding: 1px 6px;
  border-radius: var(--radius-sm);
}

/* ------------------------------------------------------------
   Prism syntax highlighting — themed to the site tokens rather
   than a stock Prism theme, so the colors stay on-brand. Only
   the JS is vendored (no Prism CSS), so these rules fully own
   the token styling. Base text falls back to .dev-code color.
   ------------------------------------------------------------ */
.dev-code .token.comment,
.dev-code .token.prolog,
.dev-code .token.doctype,
.dev-code .token.cdata { color: var(--text-dim); font-style: italic; }

.dev-code .token.keyword,
.dev-code .token.boolean { color: #c4b5fd; }            /* import, with, for, not, None */

.dev-code .token.string,
.dev-code .token.string-interpolation,
.dev-code .token.triple-quoted-string { color: #8ad6a0; }  /* string literals */

.dev-code .token.number { color: #f0b88a; }             /* ints, floats */

.dev-code .token.builtin,
.dev-code .token.function { color: var(--accent); }     /* print, sum, .open(), .wells() */

.dev-code .token.class-name { color: #e5c07b; }         /* Database, RsvCat, ForecastSegment */

.dev-code .token.decorator,
.dev-code .token.annotation { color: var(--accent); }

.dev-code .token.operator,
.dev-code .token.punctuation { color: var(--text-muted); }

/* The {expr} braces inside f-strings read as accent, not string-green */
.dev-code .token.interpolation-punctuation { color: var(--accent); }
.dev-code .token.interpolation .token.punctuation { color: var(--text-muted); }

/* ============================================================
   SECTIONS
   ============================================================ */
.dev-section {
  padding: var(--space-9) 0;
  border-top: 1px solid var(--border);
  background: var(--bg);
}
.dev-section-alt {
  background: linear-gradient(180deg, var(--bg) 0%, var(--surface-1) 100%);
}

.dev-narrow {
  max-width: 820px;
}

.dev-section-header {
  text-align: center;
  margin-bottom: var(--space-7);
  display: flex;
  flex-direction: column;
  align-items: center;
}

.dev-eyebrow {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: var(--space-3);
}

.dev-section-title {
  font-size: clamp(26px, 3.2vw, 38px);
  font-weight: 700;
  letter-spacing: -0.025em;
  margin: 0;
}

/* ============================================================
   CAPABILITIES GRID
   ============================================================ */
.dev-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-4);
}

.dev-card {
  background: var(--surface-1);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-5);
  transition: border-color 220ms var(--ease), transform 220ms var(--ease);
}
.dev-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

.dev-card-title {
  font-size: 17px;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-2);
  color: var(--text);
}

.dev-card-body {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================================
   EXAMPLES + PROSE
   ============================================================ */
.dev-example-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: var(--space-6) 0 var(--space-3);
}
.dev-example-label:first-of-type { margin-top: 0; }

.dev-prose {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text-muted);
  text-align: center;
  margin: 0;
}

/* ============================================================
   SOFT INWARD CTA (footer of the "Who it's for" section)
   ============================================================ */
.dev-soft-cta-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--space-4);
  margin-top: var(--space-7);
}
.dev-soft-cta-text {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media screen and (max-width: 1000px) {
  .dev-grid { grid-template-columns: repeat(2, 1fr); }
}

@media screen and (max-width: 600px) {
  .dev-hero { padding: var(--space-8) 0 var(--space-7); }
  .dev-section { padding: var(--space-7) 0; }
  .dev-grid { grid-template-columns: 1fr; }
  .dev-hero-actions { width: 100%; flex-direction: column; align-items: stretch; }
  .dev-hero-actions .btn { justify-content: center; }
  .dev-code { font-size: 13px; padding: var(--space-4); }
}
