/* ===================================================================
   nSTAT-python — light documentation theme for sphinx_rtd_theme.
   Intentionally minimal: the stock Read-the-Docs light theme provides
   the base (white content, dark readable text, standard sidebar). This
   file only styles the structural additions — the Example Index gallery
   cards and the homepage "scope" hero — in a clean, high-contrast light
   palette. Injected via conf.py (html_static_path + html_css_files).
   =================================================================== */

:root {
  --panel:     #ffffff;
  --panel-2:   #f0f3f6;
  --bg-2:      #f5f7fa;
  --ink:       #1b2027;
  --ink-soft:  #45515d;
  --ink-faint: #6b7682;
  --line:      #d9dfe5;
  --line-soft: #eaeef2;
  --accent:    #2f7d12;   /* dark, readable green — brand accent */
  --accent-dim:#245f0d;
  --trace:     #4e9e1f;   /* medium green for decorative signal lines */
  --shadow:    0 8px 24px -14px rgba(20,30,40,.28);
}

/* ---------- Example gallery cards (docs/Examples.md) ---------- */
.ex-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(232px, 1fr));
  gap: 1rem;
  margin: 1.3rem 0 2rem;
}
.ex-card {
  display: flex; flex-direction: column;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
  text-decoration: none !important;
  transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.ex-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}
.ex-card .ex-thumb {
  display: block; width: 100%; aspect-ratio: 16 / 10;
  object-fit: cover; background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.ex-card .ex-body { display: block; padding: .8rem .92rem 1rem; }
.ex-card .ex-eyebrow {
  display: block;
  font-family: "Roboto Mono", SFMono-Regular, Menlo, monospace;
  font-size: .64rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--accent-dim);
}
.ex-card .ex-title {
  display: block;
  color: var(--ink); font-weight: 700; font-size: 1.0rem;
  margin: .25rem 0 .35rem; line-height: 1.2;
}
.ex-card .ex-desc { display: block; color: var(--ink-soft); font-size: .85rem; line-height: 1.45; }
.ex-card:hover .ex-title { color: var(--accent); }
/* Compact (no-thumbnail) cards for the workflow notebooks. */
.ex-card.ex-mini { flex-direction: row; align-items: flex-start; gap: .65rem; padding: .85rem .9rem; }
.ex-card.ex-mini .ex-glyph { flex: 0 0 auto; margin-top: .15rem; color: var(--accent); }
.ex-card.ex-mini .ex-body { padding: 0; }
.ex-card.ex-mini .ex-title { font-size: .92rem; margin: 0 0 .2rem; }
/* Quiet chip list for parity-scaffold (non-tutorial) references. */
.ex-refs { display: flex; flex-wrap: wrap; gap: .4rem; margin: .7rem 0 1.4rem; padding: 0; list-style: none; }
.ex-refs a {
  font-family: "Roboto Mono", SFMono-Regular, Menlo, monospace; font-size: .8rem;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 7px; padding: .3em .6em; color: var(--ink-soft) !important;
}
.ex-refs a:hover { border-color: var(--accent); color: var(--accent) !important; text-decoration: none; }

/* ---------- Homepage "scope" hero (docs/index.rst) ---------- */
.rst-content .nstat-hero {
  margin: 1.3rem 0 1.1rem;
  padding: .85rem 1.1rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--bg-2);
}
.rst-content .nstat-hero .line-block,
.rst-content .nstat-hero .line { margin: 0; }
.rst-content .nstat-hero .line {
  font-family: "Roboto Mono", SFMono-Regular, Menlo, monospace;
  font-size: .82rem; line-height: 1.8; color: var(--ink-soft);
}
.rst-content .nstat-hero code.literal { color: var(--accent-dim); }

.rst-content .nstat-scope {
  margin: 1.4rem 0 1.7rem;
  border: 1px solid var(--line); border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow); overflow: hidden; position: relative;
}
.rst-content .nstat-scope .bar {
  display: flex; align-items: center; gap: .5rem;
  padding: .55rem .9rem; border-bottom: 1px solid var(--line);
  font-family: "Roboto Mono", SFMono-Regular, Menlo, monospace; font-size: .7rem;
  color: var(--ink-faint); letter-spacing: .1em; text-transform: uppercase;
}
.rst-content .nstat-scope .bar .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--line); }
.rst-content .nstat-scope .bar .dot.live { background: var(--trace); }
.rst-content .nstat-scope .bar .ch { margin-left: auto; color: var(--accent-dim); }
.rst-content .nstat-scope svg { display: block; width: 100%; height: 124px; background: var(--bg-2); }
.rst-content .nstat-scope .trace { fill: none; stroke: var(--trace); stroke-width: 1.6; }
.rst-content .nstat-scope .trace-2 { fill: none; stroke: #8fb8c4; stroke-width: 1.2; opacity: .7; }
.rst-content .nstat-scope .raster {
  position: absolute; inset: auto 0 0 0; height: 32px;
  display: flex; align-items: stretch; gap: 0; padding: 0 1px; opacity: .85;
}
.rst-content .nstat-scope .raster i {
  flex: 1; border-left: 1.5px solid var(--trace); opacity: 0;
  animation: nstat-tick 3.2s linear infinite;
}
@keyframes nstat-tick { 0%,92%{opacity:0} 6%,40%{opacity:.8} 60%{opacity:.2} }
@media (prefers-reduced-motion: reduce) {
  .rst-content .nstat-scope .raster i { animation: none; opacity: .45; }
}
