/*
 * Styles for the two ES-HyperNEAT posts. Each post links this file from its
 * body, so it arrives (and leaves) with the post under instant-nav and never
 * touches another page.
 */

/* A wider column than the site default (700px): these posts sit beside
   wide figures, and the header widens with it so the edges line up. */
:root { --max-w: 820px; }

/* A translucent backdrop behind the article so text and tables stay
   readable over the moving background. */
main article {
  background: rgba(8, 5, 16, 0.64);
  border: 1px solid rgba(235, 225, 210, 0.08);
  border-radius: 14px;
  padding: 1.75rem 2rem 2.25rem;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.post-content h2 { font-size: 1.75rem; margin-top: 2.75rem; }
.post-content h3 { font-size: 1.35rem; margin-top: 2rem; }
.post-content table { font-size: var(--fs-base); }
@media (max-width: 640px) {
  main article { padding: 1.1rem 1rem 1.5rem; border-radius: 10px; }
  .post-content h2 { font-size: 1.45rem; }
  .post-content h3 { font-size: 1.2rem; }
}

.eshn-fig { margin: 2rem 0 2.25rem; font-family: var(--font-sans); font-size: var(--fs-sm); line-height: 1.5; }
.eshn-wide { width: min(1000px, 94vw); position: relative; left: 50%; transform: translateX(-50%); }
.eshn-panel { background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; padding: 1rem 1.1rem 0.9rem; }
.eshn-fig figcaption, .eshn-caption { color: var(--muted); font-size: var(--fs-sm); margin-top: 0.7rem; font-family: var(--font-sans); line-height: 1.5; }
.eshn-controls { display: flex; flex-wrap: wrap; gap: 0.6rem 1.4rem; align-items: center; margin-bottom: 0.7rem; }
.eshn-seg { display: inline-flex; border: 1px solid var(--border-strong); border-radius: 7px; overflow: hidden; flex-wrap: wrap; }
.eshn-seg button, .eshn-btn { font: inherit; color: var(--text); background: transparent; border: 0; padding: 0.35rem 0.75rem; cursor: pointer; }
.eshn-seg button + button { border-left: 1px solid var(--border-strong); }
.eshn-seg button.on { background: var(--accent); color: #1a1208; font-weight: 500; }
.eshn-btn { border: 1px solid var(--border-strong); border-radius: 7px; }
.eshn-btn:hover, .eshn-seg button:not(.on):hover { background: var(--bg-raised); }
.eshn-slider { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--muted); }
.eshn-slider input { accent-color: var(--accent); width: 150px; }
.eshn-slider-value { color: var(--text); font-family: var(--font-mono); font-size: var(--fs-xs); min-width: 3.5em; }
.eshn-row { display: flex; flex-wrap: wrap; gap: 1.2rem; align-items: flex-start; }
.eshn-col { flex: 1 1 280px; min-width: 0; }
.eshn-side { flex: 1 1 260px; min-width: 0; }
.eshn-canvas { display: block; border-radius: 6px; background: rgba(5,3,10,0.6); }
.eshn-cap { color: var(--muted); margin-bottom: 0.35rem; }
.eshn-legend > div { margin-bottom: 0.2rem; }
.eshn-legend-row { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; margin-bottom: 0.4rem; }
.eshn-key { display: inline-block; vertical-align: middle; }
.eshn-key-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--text); }
.eshn-key-grad { width: 42px; height: 9px; border-radius: 2px; }
.eshn-key-box { width: 12px; height: 12px; border: 2.5px solid; border-radius: 2px; }
.eshn-key-line { width: 18px; height: 2px; border-radius: 1px; }
.eshn-key-tick { width: 2px; height: 14px; background: var(--text); }
.eshn-key-ring { width: 12px; height: 12px; border-radius: 50%; border: 2.5px solid; box-sizing: border-box; }
.eshn-paired .eshn-col { flex-basis: 340px; }
.eshn-stats { border-collapse: collapse; margin: 0.6rem 0; font-size: 0.95rem; }
.eshn-stats th, .eshn-stats td { padding: 0.25rem 0.9rem 0.25rem 0; text-align: right; border-bottom: 1px solid var(--border); }
.eshn-stats th:first-child, .eshn-stats td:first-child { text-align: left; color: var(--muted); }
.eshn-stats td { font-variant-numeric: tabular-nums; }
.eshn-note { color: var(--muted); margin: 0.4rem 0 0; font-size: var(--fs-sm); }
.eshn-readout { margin-top: 0.8rem; }
.eshn-big-num { font-size: 2rem; font-weight: 500; font-variant-numeric: tabular-nums; }
.eshn-big-lab { color: var(--muted); }
.eshn-meter { position: relative; height: 10px; border-radius: 5px; background: rgba(57,135,229,0.18); margin: 0.4rem 0 2rem; }
.eshn-meter-fill { position: absolute; left: 0; top: 0; bottom: 0; background: #3987e5; border-radius: 5px; }
.eshn-meter-mark { position: absolute; top: -4px; bottom: -4px; width: 2px; background: var(--text); }
.eshn-meter-mark span { position: absolute; top: 18px; left: -40px; width: 120px; font-size: var(--fs-xs); color: var(--muted); }
.eshn-chart { position: relative; }
.eshn-chart svg { width: 100%; height: auto; display: block; overflow: visible; }
.eshn-tick { fill: var(--muted); font-size: 11px; font-family: var(--font-sans); }
.eshn-axis-label, .eshn-row-label { fill: var(--muted); font-size: 12px; font-family: var(--font-sans); }
.eshn-row-label { fill: var(--text); }
.eshn-tip { display: none; position: absolute; top: 0; pointer-events: none; background: rgba(14,10,24,0.96); border: 1px solid var(--border-strong); border-radius: 6px; padding: 0.4rem 0.6rem; font-size: var(--fs-xs); white-space: nowrap; z-index: 2; }
.eshn-tip-head { color: var(--muted); margin-bottom: 0.15rem; }
.eshn-table { margin-top: 0.5rem; color: var(--muted); font-size: var(--fs-xs); }
.eshn-table summary { cursor: pointer; }
.eshn-table table { border-collapse: collapse; margin-top: 0.4rem; }
.eshn-table th, .eshn-table td { padding: 0.15rem 0.8rem 0.15rem 0; text-align: left; border-bottom: 1px solid var(--border); }
.eshn-diagram { width: 100%; height: auto; display: block; }
.eshn-diagram text { font-family: var(--font-sans); font-size: 13px; fill: var(--text); }
.eshn-diagram .m { fill: var(--muted); font-size: 12px; }
.eshn-tldr { border: 1px solid var(--border-strong); border-radius: 10px; padding: 0.9rem 1.2rem 0.3rem; margin: 1.5rem 0 2rem; background: var(--bg-card); font-size: var(--fs-base); }
.eshn-tldr p { margin-bottom: 0.6rem; }
@media (max-width: 640px) { .eshn-slider input { width: 110px; } }
.eshn-status { color: var(--muted); font-size: var(--fs-base); border-left: 3px solid var(--accent-dim); padding: 0.1rem 0 0.1rem 1rem; margin: 0 0 1.75rem; }
.eshn-status em { color: var(--text); font-style: normal; font-weight: 500; }
.eshn-swim-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0.9rem; }
.eshn-swim-label { color: var(--text); font-weight: 500; margin-bottom: 0.3rem; }
.eshn-swim-score { color: var(--muted); font-size: var(--fs-xs); margin-top: 0.3rem; }
.eshn-swim .eshn-canvas { width: 100%; }
.eshn-details { border: 1px solid var(--border); border-radius: 10px; padding: 0.55rem 1.1rem; margin: 1rem 0 1.5rem; background: var(--bg-card); font-size: var(--fs-base); }
.eshn-details > summary { cursor: pointer; font-family: var(--font-sans); font-size: var(--fs-sm); color: var(--accent); }
.eshn-details[open] > summary { margin-bottom: 0.6rem; }
.eshn-details p:last-child, .eshn-details ul:last-child { margin-bottom: 0.3rem; }
/* more air between paragraphs, so each new idea starts visibly fresh */
.post-content > p { margin-bottom: 1.6rem; }

/* Full-screen toggle for figures */
.eshn-panel { position: relative; }
.eshn-panel { padding-top: 2.6rem !important; }   /* a clear strip for the full-screen button */
.eshn-expand { position: absolute; top: 0.5rem; right: 0.5rem; width: 2rem; height: 2rem; padding: 0; border: 1px solid var(--border-strong); border-radius: 6px; background: rgba(14, 10, 24, 0.85); color: var(--text); font-size: 1rem; line-height: 1; cursor: pointer; z-index: 3; }
.eshn-expand:hover { background: var(--bg-raised); }
.eshn-panel.eshn-full { position: fixed !important; inset: 0; left: 0 !important; transform: none !important; width: auto !important; max-width: none; margin: 0 !important; border-radius: 0; z-index: 1000; overflow: auto; background: #07040d; padding: 3rem 4vw 2rem; }
.eshn-full .eshn-expand { position: fixed; top: 0.75rem; right: 0.75rem; }
.eshn-full .eshn-canvas { width: auto !important; height: auto !important; max-width: 100% !important; max-height: 78vh; margin: 0 auto; }
.eshn-full .eshn-swim .eshn-canvas { max-height: 40vh; }
.eshn-full .eshn-chart { max-width: 1100px; margin: 0 auto; }
body:has(.eshn-full) { overflow: hidden; }
