/* ───────────────────────────────────────────────────────────────────────────
   stockmind.io — shared styles

   Navigation, logo, figures and print rules, in one place. These used to be
   duplicated across eight pages and drifted: one page styled a container class
   that had been renamed, another had no unconditional layout at all, and a
   later-appended rule silently overrode a media query so the mobile menu
   stopped collapsing.

   Loaded AFTER each page's inline <style>, so these rules win. Page-specific
   styling stays inline.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Navigation ──────────────────────────────────────────────────────────── */
nav, .nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
  background: rgba(12, 15, 20, .88);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--bdr, #2a3348);
  padding: 14px 20px;
}

.nav-logo, a.nav-logo {
  font-size: 22px; font-weight: 800; letter-spacing: -.02em;
  text-transform: uppercase;
  color: var(--t0, #edf0f7);
  text-decoration: none;
  line-height: 1; white-space: nowrap;
}
.nav-logo span { color: var(--amber, #f0a500); }

.nav-right { display: flex; align-items: center; gap: 22px; }

.nav-link {
  color: var(--t1, #8e9ab5);
  text-decoration: none;
  font-size: 13px; letter-spacing: .04em; text-transform: uppercase;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  transition: color .15s ease;
  white-space: nowrap;
}
.nav-link:hover { color: var(--t0, #edf0f7); }
.nav-link[aria-current="page"] { color: var(--amber, #f0a500); }

.nav-cta {
  background: var(--amber, #f0a500);
  color: #0c0f14; text-decoration: none;
  font-weight: 700; font-size: 13px;
  padding: 9px 16px; border-radius: 8px;
  white-space: nowrap;
}

/* ── Hamburger ───────────────────────────────────────────────────────────── */
.nav-burger {
  display: none;
  background: none;
  border: 1px solid var(--bdr, #2a3348);
  border-radius: 8px;
  width: 42px; height: 38px;
  padding: 0 10px;
  cursor: pointer;
  flex-direction: column; justify-content: center; gap: 5px;
}
.nav-burger span {
  display: block; height: 2px; width: 100%;
  background: var(--t0, #edf0f7); border-radius: 2px;
  transition: transform .18s ease, opacity .18s ease;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 760px) {
  nav, .nav { position: sticky; padding: 12px 16px; }
  .nav-burger { display: flex; }
  .nav-right {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--s0, #111520);
    border-top: 1px solid var(--bdr, #2a3348);
    border-bottom: 1px solid var(--bdr, #2a3348);
    padding: 8px 0;
    max-height: calc(100vh - 64px); overflow-y: auto;
    z-index: 60;
  }
  .nav-right.open { display: flex; }
  .nav-right .nav-link {
    display: block; padding: 13px 20px; font-size: 15px;
    border-bottom: 1px solid var(--bdr, #2a3348);
    position: static;
  }
  .nav-right .nav-link:last-of-type { border-bottom: 0; }
  .nav-right .nav-cta {
    margin: 10px 20px 6px; padding: 12px 18px;
    text-align: center; position: static;
  }
}
@media (max-width: 420px) {
  .nav-logo, a.nav-logo { font-size: 19px; }
  .nav-cta { font-size: 12.5px; padding: 8px 13px; }
}

/* ── Figures ─────────────────────────────────────────────────────────────── */
figure.fig { margin: 32px 0; }
figure.fig svg { width: 100%; height: auto; display: block; }
figure.fig figcaption {
  font-size: 12.5px; color: var(--t2, #4f5a72);
  margin-top: 12px; line-height: 1.65;
  border-left: 2px solid var(--bdr, #2a3348); padding-left: 12px;
}
figure.fig figcaption b { color: var(--t1, #8e9ab5); font-weight: 600; }

@media print {
  nav, .nav, .nav-burger { display: none !important; }
  figure.fig { page-break-inside: avoid; }
  figure.fig svg text { fill: #333 !important; }
  figure.fig svg [data-ink="line"] { stroke: #333 !important; }
}
