/* Base resets to match the React app */
*, *::before, *::after { border-color: #2c7731; }
/* Always reserve the scrollbar gutter so the centered nav never shifts
   between pages, regardless of per-page content height. scrollbar-gutter
   covers modern browsers; overflow-y:scroll is the fallback for engines
   that don't support it (e.g. Safari < 16.4). */
html { scrollbar-gutter: stable; overflow-y: scroll; }
html, body {
  background-color: #02160f;
  color: #d8e0e0;
  font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2 {
  font-family: 'Manrope', ui-sans-serif, system-ui, sans-serif;
  font-weight: 800;
  letter-spacing: -0.025em;
}
/* Custom CSS vars for use in inline styles */
:root {
  --void: #02160f;
  --forest: #073e2b;
  --canopy: #2c7731;
  --signal: #78d64b;
  --mist: #bbc9bc;
  --frost: #d8e0e0;
}
/* Animations */
@keyframes draw-line {
  from { stroke-dashoffset: var(--dash, 200); }
  to { stroke-dashoffset: 0; }
}
@keyframes pulse-node {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.08); }
}
@keyframes zd-badge-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(120,214,75,0.55), 0 0 40px 6px rgba(120,214,75,0.35); }
  50% { box-shadow: 0 0 0 14px rgba(120,214,75,0), 0 0 60px 12px rgba(120,214,75,0.5); }
}
@keyframes zd-badge-float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-6px); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
@keyframes rampDraw {
  to { stroke-dashoffset: 0; }
}
@keyframes rampFade {
  to { opacity: 1; }
}
@keyframes rampDashRestore {
  to { stroke-dasharray: 5 5; stroke-dashoffset: 0; }
}
/* Section switcher hidden panel */
.ss-panel-inactive {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
/* Prose reset */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }
}

/* Trust bar scrolling marquee */
.trust-marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-image: linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
}
.trust-track {
  display: flex;
  width: max-content;
  align-items: center;
  gap: 4rem;
  padding: 0 2rem;
  animation: marquee 45s linear infinite;
}
.trust-marquee:hover .trust-track {
  animation-play-state: paused;
}
.trust-logo {
  width: auto;
  flex: none;
  object-fit: contain;
  opacity: 0.7;
  filter: grayscale(1);
  transition: opacity 0.25s ease, filter 0.25s ease;
}
.trust-logo:hover {
  opacity: 1;
  filter: grayscale(0);
}
/* Per-logo optical sizing — tuned so each reads at roughly equal visual weight */
.trust-logo--candid   { height: 1.9rem; }
.trust-logo--razorpay { height: 2.1rem; }
.trust-logo--gokwik   { height: 2.5rem; }
.trust-logo--medela   { height: 2.5rem; }
.trust-logo--flyntlok { height: 1.9rem; }
.trust-logo--mavenpay { height: 2.1rem; }
.trust-logo--oxxo     { height: 2.8rem; }
@media (min-width: 640px) {
  .trust-track { gap: 5rem; }
  .trust-logo--candid   { height: 2.1rem; }
  .trust-logo--razorpay { height: 2.4rem; }
  .trust-logo--gokwik   { height: 2.85rem; }
  .trust-logo--medela   { height: 2.8rem; }
  .trust-logo--flyntlok { height: 2.1rem; }
  .trust-logo--mavenpay { height: 2.3rem; }
  .trust-logo--oxxo     { height: 3.2rem; }
}
@media (prefers-reduced-motion: reduce) {
  .trust-track { animation: none; }
}

/* ---- Product screenshots: click to expand ---- */
.ix-shot {
  display: block;
  margin: 0;
  cursor: zoom-in;
}
.ix-shot-frame {
  position: relative;
  overflow: hidden;
  border-radius: 0.75rem;
  border: 1px solid #2c7731;
  background: #073e2b;
  aspect-ratio: 16 / 10;
  transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
}
.ix-shot:hover .ix-shot-frame,
.ix-shot:focus-visible .ix-shot-frame {
  border-color: #78d64b;
  transform: translateY(-2px);
  box-shadow: 0 20px 60px -24px rgba(120, 214, 75, 0.4);
}
.ix-shot:focus-visible { outline: none; }
.ix-shot-frame > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
/* Embedded HTML/animation rendered at a fixed design size and scaled to fit the frame (see scaleEmbeds in JS) */
.ix-embed-frame {
  position: absolute;
  top: 0;
  left: 0;
  border: 0;
  transform-origin: top left;
}
/* caption pinned to the top of the box */
.ix-shot-cap {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1;
  padding: 0.85rem 1rem 1.7rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #ecf2ec;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
  background: linear-gradient(
    to bottom,
    rgba(2, 22, 15, 0.94) 0%,
    rgba(2, 22, 15, 0.78) 50%,
    rgba(2, 22, 15, 0) 100%
  );
}

/* ---- Lightbox ---- */
.ix-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(2, 7, 5, 0.92);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.2s ease, visibility 0.2s ease;
}
.ix-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}
.ix-lightbox-content {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  /* never display wider than the source image's own pixels (prevents upscaling blur) */
  max-width: min(var(--ix-max, 1400px), 95vw);
  max-height: 90vh;
}
.ix-lightbox-figure {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0;
}
.ix-lightbox-figure > img {
  display: block;
  width: 100%;
  min-height: 0;
  height: auto;
  max-height: calc(90vh - 3rem);
  object-fit: contain;
  border: 1px solid #2c7731;
  border-bottom: 0;
  border-radius: 0.75rem 0.75rem 0 0;
}
.ix-lightbox-cap {
  flex: none;
  padding: 0.85rem 1.1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.72rem;
  line-height: 1.4;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #d8e0e0;
  background: #02160f;
  border: 1px solid #2c7731;
  border-top: 0;
  border-radius: 0 0 0.75rem 0.75rem;
}
.ix-lightbox-stage {
  width: 100%;
  aspect-ratio: 16 / 10;
  max-height: 90vh;
}
.ix-lightbox-stage .ix-shot-frame {
  width: 100%;
  height: 100%;
  aspect-ratio: auto;
}
.ix-lightbox-close {
  position: absolute;
  top: -2.85rem;
  right: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  border: 1px solid #2c7731;
  background: rgba(2, 22, 15, 0.72);
  color: #d8e0e0;
  cursor: pointer;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.ix-lightbox-close:hover {
  border-color: #78d64b;
  color: #78d64b;
}
body.ix-lightbox-open {
  overflow: hidden;
}

/* ===========================================================================
   Blog / article styles
   - .post-body styles the rendered article content. Authors write plain
     semantic HTML inside <article class="post-body"> and inherit all of this.
   - .post-card styles the listing cards on blog.html.
   See /article/_TEMPLATE.html and /article/README.md for how to add a post.
   =========================================================================== */
.post-body {
  font-size: 1.0625rem;
  line-height: 1.75;
  color: #c8d3cd;
}
.post-body > * + * { margin-top: 1.4rem; }
.post-body h2 {
  margin-top: 2.75rem;
  font-size: 1.6rem;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #eef3f0;
}
.post-body h3 {
  margin-top: 2rem;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.015em;
  color: #eef3f0;
}
.post-body h4 {
  margin-top: 1.5rem;
  font-size: 1.05rem;
  font-weight: 700;
  color: #eef3f0;
}
.post-body p { color: #c8d3cd; }
.post-body a {
  color: #78d64b;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.post-body a:hover { color: #9ae673; }
.post-body strong { color: #eef3f0; font-weight: 700; }
.post-body ul, .post-body ol {
  padding-left: 1.4rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li::marker { color: #2c7731; }
.post-body blockquote {
  border-left: 3px solid #2c7731;
  padding: 0.25rem 0 0.25rem 1.25rem;
  color: #d8e0e0;
  font-style: italic;
}
.post-body img {
  border-radius: 0.75rem;
  border: 1px solid rgba(44, 119, 49, 0.5);
}
.post-body figure { margin-top: 2rem; }
.post-body figcaption {
  margin-top: 0.6rem;
  font-size: 0.85rem;
  color: #9fb0a5;
  text-align: center;
}
.post-body hr {
  margin-top: 2.5rem;
  border: 0;
  border-top: 1px solid rgba(44, 119, 49, 0.5);
}
.post-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: rgba(7, 62, 43, 0.55);
  border: 1px solid rgba(44, 119, 49, 0.4);
  border-radius: 0.35rem;
  padding: 0.1rem 0.35rem;
}
.post-body pre {
  margin-top: 1.4rem;
  background: rgba(7, 62, 43, 0.55);
  border: 1px solid rgba(44, 119, 49, 0.4);
  border-radius: 0.6rem;
  padding: 1rem 1.1rem;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.6;
}
.post-body pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  color: #d8e0e0;
  white-space: pre;
}
.post-body table {
  display: block;
  width: 100%;
  margin-top: 1.6rem;
  border-collapse: collapse;
  overflow-x: auto;
  font-size: 0.92rem;
}
.post-body th, .post-body td {
  border: 1px solid rgba(44, 119, 49, 0.45);
  padding: 0.5rem 0.75rem;
  text-align: left;
  white-space: nowrap;
}
.post-body thead th {
  background: rgba(7, 62, 43, 0.5);
  color: #eef3f0;
}

/* Category filter pills */
.post-filter {
  display: inline-flex;
  align-items: center;
  border-radius: 9999px;
  border: 1px solid rgba(44, 119, 49, 0.5);
  padding: 0.4rem 0.95rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: #bbc9bc;
  background: transparent;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease, background 0.2s ease;
}
.post-filter:hover {
  border-color: #78d64b;
  color: #78d64b;
}
.post-filter.is-active {
  background: #78d64b;
  border-color: #78d64b;
  color: #02160f;
  font-weight: 600;
}
.post-filter__count {
  margin-left: 0.35rem;
  font-size: 0.72rem;
  opacity: 0.6;
  font-variant-numeric: tabular-nums;
}

/* Listing cards */
.post-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  border-radius: 0.9rem;
  border: 1px solid rgba(44, 119, 49, 0.45);
  background: rgba(7, 62, 43, 0.28);
  overflow: hidden;
  transition: border-color 0.2s ease, transform 0.2s ease, background 0.2s ease;
}
.post-card:hover {
  border-color: #78d64b;
  transform: translateY(-3px);
  background: rgba(7, 62, 43, 0.45);
}
.post-card__media {
  aspect-ratio: 16 / 9;
  width: 100%;
  object-fit: cover;
  background: linear-gradient(135deg, #073e2b, #02160f);
}

