/* ============================================================================
   Cor Portal v2 - mindmap surface (.mm-*)
   A full-bleed markmap (markdown -> interactive tree) rendered below the shared
   masthead. Content is generated by scripts/build-mindmap.py from the snapshot
   (window.COR_MINDMAP_MD), so it stays in sync with Cor. Styled with the portal
   tokens - parchment ground, oxblood node text, teal + gold branches, Spectral.
   ============================================================================ */

html, body { height: 100%; }
body[data-page="mindmap"] {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: radial-gradient(125% 90% at 50% -12%, var(--parchment-soft), var(--parchment) 62%);
}

/* the masthead keeps its normal chrome; the map fills everything beneath it */
.mm-main {
  flex: 1 1 auto;
  min-height: 0;
  position: relative;
}
#markmap {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* a quiet caption, top-left of the canvas, so the surface reads as "the map" and
   shows the data is live (filled by mindmap.js from COR_MINDMAP_META) */
.mm-caption {
  position: absolute;
  top: 14px;
  left: 16px;
  z-index: 4;
  pointer-events: none;
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted-warm);
  max-width: 60ch;
  line-height: 1.5;
}
.mm-caption b { color: var(--oxblood); font-weight: 600; }

/* ---- markmap nodes / links: oxblood ink in Spectral, so the tree reads as
        Cor prose; links teal; code a gold mono pill ---- */
svg.markmap text { fill: var(--oxblood-ink) !important; font-family: var(--serif); }
svg.markmap foreignObject,
svg.markmap foreignObject * { color: var(--oxblood-ink) !important; font-family: var(--serif); }
svg.markmap a, svg.markmap a * { color: var(--teal) !important; text-decoration: none; }
svg.markmap a:hover, svg.markmap a:hover * { color: var(--teal-bright) !important; text-decoration: underline; }
svg.markmap code {
  font-family: var(--mono); color: var(--gold-dim);
  background: rgba(58, 18, 24, .06); padding: .04em .32em; border-radius: 4px; font-size: .92em;
}
svg.markmap .markmap-link { opacity: .9; }

/* ---- toolbar -> parchment card, oxblood icons, teal hover + the signature
        teal hard-shadow, matching the portal chrome ---- */
.mm-toolbar {
  position: fixed; right: 14px; bottom: 14px; z-index: 6;
  background: var(--parchment-soft) !important;
  border: 1px solid var(--border) !important;
  border-radius: 8px !important;
  box-shadow: var(--shadow-card) !important;
}
.mm-toolbar-brand { display: none !important; }
.mm-toolbar-item > * { color: var(--oxblood-ink) !important; }
.mm-toolbar-item:hover > * { color: var(--teal) !important; }
