/*
CHANGE LOG
File: static/css/nsg_mind.css
Purpose: Styles the mind map and its slide-out drawers in the AI section of the nsgia.com home page.
How it works: linked from templates/portal/portal_frame.html. Every rule below the color block is copied
         unchanged from mh/iverify2 maparea/static/css/relay_network.css (the Truck Stop Light network page),
         so the measurements match that page and the ProHRHQ explainer. Only the colors differ: the --ns-*
         names iVerify uses are set here, inside this component only, to the blues nsgia.com already uses.
         The line color (brass) is iVerify's. The drawer h3 rule is the one addition (the three questions).
         Markup: templates/portal/partials/_ai_mind.html and _ai_mind_drawers.html. Script: nsg_mind.js.
Version History:
  2026-12-01 v1.3 - Numbered lists in a drawer use the same spacing as bulleted ones.
  2026-12-01 v1.2 - The center can be a button (pointer, lighter on hover); list style for a drawer.
  2026-12-01 v1.1 - Desktop side padding 4px (was 16px) and center gap 36px (was 44px), for this page only: the
                    live check found the map 19 pixels wider than its card, so it scrolled sideways.
  2026-12-01 v1.0 - Created on Michael's go ("adopt the iVerify navigation model for NSGIA").
*/
.nsg-mind-wrap, dialog.tn-drawer {
  --ns-green: var(--color-primary, #2c5282); --ns-green-soft: var(--color-primary-light, #3182ce); --ns-brass: #b08d57;
  --ns-ink: #1f2d3d; --ns-muted: #5b6b7b; --ns-line: #e2e7ec;
  --ns-bg: #f6f7f9; --ns-card: #ffffff;
}
.nsg-mind-wrap { background: #fff; border-top: 1px solid var(--ns-line); }
/* v1.1: the nsgia.com card is narrower than iVerify's page, so on desktop the map's side padding and center gap
   are a little smaller here than in relay_network.css. Everything else keeps iVerify's measurements. */
@media (min-width: 761px) { .nsg-mind-wrap .tn-mind { gap: 36px; padding-left: 4px; padding-right: 4px; } }
.nsg-mind-wrap > p.tn-ex-hint { color: var(--ns-muted); font-size: .95rem; margin: 0; padding: 14px 2rem 0; }

/* ---- copied from relay_network.css: pills, drawer, buttons ---- */
.tn-ex-pill { display: inline-block; padding: 7px 14px; font: inherit; font-size: .92rem; font-weight: 700; line-height: 1.3; color: var(--ns-green);
  background: #fff; border: 1px solid var(--ns-line); border-radius: 999px; cursor: pointer; }
.tn-ex-pill:hover, .tn-ex-pill:focus-visible { background: var(--ns-green); border-color: var(--ns-green); color: #fff; }
dialog.tn-drawer { margin: 0 0 0 auto; padding: 1rem; width: min(440px, 92vw); height: 100vh; max-height: 100vh; border: 0; border-left: 1px solid var(--ns-line);
  background: #fff; color: var(--ns-ink); overflow-y: auto; font-family: 'DM Sans', sans-serif; font-size: 15px; line-height: 1.5; }
dialog.tn-drawer::backdrop { background: rgba(18, 42, 67, .35); }
.tn-drawer-bar { display: flex; justify-content: flex-end; margin: 0 0 .75rem; }
.tn-out-btn { min-height: 44px; padding: .5rem .9rem; font: inherit; font-size: 1rem; color: var(--ns-green); background: transparent; border: 1px solid var(--ns-green); border-radius: 4px; cursor: pointer; }
.tn-out-btn:hover, .tn-out-btn:focus-visible { color: #fff; background: var(--ns-green); }
.tn-drawer h2 { font-family: 'Instrument Serif', Georgia, serif; font-weight: 400; font-size: 1.6rem; line-height: 1.2; margin: 0 0 .6rem; padding-bottom: .35rem; border-bottom: 1px solid var(--ns-line); }
.tn-drawer p { margin: 0 0 .7rem; }
.tn-drawer a { color: var(--ns-green); }
.tn-drawer-back { margin: 1rem 0; }
.tn-back-btn { min-height: 2.6rem; padding: .75rem 1.5rem; font: inherit; font-weight: 600; color: #fff; background: var(--ns-green); border: 1px solid var(--ns-green); border-radius: 6px; cursor: pointer; }
.tn-back-btn:hover, .tn-back-btn:focus-visible { background: var(--ns-green-soft); }
/* the one addition: the three question headings in a drawer */
.tn-drawer h3 { font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ns-muted); margin: 1rem 0 .25rem; }

/* ---- copied from relay_network.css: the mind map. Desktop: the center with boxes left and right, topics
   opening outward, joined by drawn lines. Phone: one column, topics indented under their box. ---- */
.tn-mind { position: relative; display: flex; align-items: center; justify-content: center; gap: 44px; padding: 18px 16px 26px; overflow-x: auto; }
.tn-mind-lines { position: absolute; left: 0; top: 0; pointer-events: none; }
.tn-mind-lines path { fill: none; stroke: var(--ns-brass); stroke-width: 2; }
.tn-mind-side { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 14px; }
.tn-mind-left { align-items: flex-end; }
.tn-mind-right { align-items: flex-start; }
.tn-mind-branch { display: flex; align-items: center; gap: 36px; }
.tn-mind-left .tn-mind-branch { flex-direction: row-reverse; }
.tn-mind-kids { display: none; flex-direction: column; gap: 8px; align-items: flex-start; }
.tn-mind-left .tn-mind-kids { align-items: flex-end; }
.tn-mind-node[aria-expanded="true"] + .tn-mind-kids { display: flex; }
.tn-mind-root { position: relative; z-index: 1; flex: 0 0 auto; width: 132px; height: 132px; border-radius: 999px; background: var(--ns-green); color: #fff;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 12px; font-family: 'Instrument Serif', Georgia, serif; font-size: 23px; line-height: 1.1; }
.tn-mind-node { width: 200px; text-align: left; font: inherit; background: #fff; color: var(--ns-ink); border: 2px solid var(--ns-green); border-radius: 12px; padding: 8px 12px; cursor: pointer; }
.tn-mind-node b { display: block; font-size: 1rem; font-weight: 700; line-height: 1.25; }
.tn-mind-node b::after { content: " +"; color: var(--ns-brass); }
.tn-mind-node[aria-expanded="true"] b::after { content: " \2212"; }
.tn-mind-node span { display: block; font-size: .8rem; line-height: 1.3; color: var(--ns-muted); margin-top: 2px; }
.tn-mind-node:hover, .tn-mind-node:focus-visible { background: var(--ns-bg); }
.tn-mind-node[aria-expanded="true"] { background: var(--ns-green); color: #fff; }
.tn-mind-node[aria-expanded="true"] span { color: #dfe9e3; }
.tn-mind-leaf { white-space: nowrap; }
@media (max-width: 760px) {
  .tn-mind { flex-direction: column; align-items: stretch; gap: 10px; padding: 12px 12px 18px; overflow: visible; }
  .tn-mind-lines { display: none; }
  .tn-mind-root { order: -1; width: auto; height: auto; border-radius: 12px; padding: 10px; font-size: 21px; }
  .tn-mind-side { gap: 10px; align-items: stretch; }
  .tn-mind-branch, .tn-mind-left .tn-mind-branch { flex-direction: column; align-items: stretch; gap: 8px; }
  .tn-mind-node { width: auto; }
  .tn-mind-kids, .tn-mind-left .tn-mind-kids { align-items: flex-start; margin-left: 14px; padding-left: 12px; border-left: 2px solid var(--ns-brass); }
  .nsg-mind-wrap > p.tn-ex-hint { padding: 12px 1.25rem 0; }
}

/* v1.2: the center is a button when it opens a drawer; the short list in a drawer (copied from relay_network.css) */
button.tn-mind-root { border: 0; cursor: pointer; }
button.tn-mind-root:hover, button.tn-mind-root:focus-visible { background: var(--ns-green-soft); }
.tn-drawer ul, .tn-drawer ol { margin: 0 0 .8rem; padding-left: 1.6rem; }
.tn-drawer li { margin: 0 0 .25rem; }
