/* 词族导图 · 书卷三稿. Loaded only by units/unit_XX/family-maps/index.html. "html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell" is expanded by build_fmap.py to the
   page scope (html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell) so these rules win over the
   older map styles without !important. Colours: family purple (--jt-fam*) as on the learning page's 词族 block. */

/* ---------- hero ---------- */
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-hero{margin:0 0 18px}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-hero .fm-intro{max-width:720px;margin:0 0 14px;font-size:15px;line-height:1.8;color:var(--jt-ink-2)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-add{font-style:normal;font-weight:700;color:var(--jt-fam)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-root{text-decoration:underline dashed var(--jt-fam);text-decoration-thickness:1px;text-underline-offset:3px}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-legend{display:flex;flex-wrap:wrap;gap:8px 18px;margin:0;padding:12px 14px;list-style:none;
  background:rgba(250,247,240,.7);border:var(--jt-hair) solid var(--jt-line);border-radius:var(--jt-r-panel)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-legend li{display:flex;align-items:center;gap:8px;font-size:13px;line-height:1.5;color:var(--jt-ink-2)}

/* ---------- search + jump list ---------- */
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-tools{display:flex;flex-wrap:wrap;align-items:center;gap:10px 18px;margin:0 0 12px}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-tools .fm-search{flex:1 1 240px;max-width:420px;height:44px;padding:0 12px;font-size:15px;box-sizing:border-box}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-back{font-size:14px;min-height:44px;display:inline-flex;align-items:center}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-jumps{display:flex;flex-wrap:wrap;gap:6px;margin:0 0 18px}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-jump{display:inline-flex;align-items:baseline;gap:5px;min-height:36px;box-sizing:border-box;padding:7px 10px;
  border:var(--jt-hair) solid var(--jt-line-strong);border-radius:var(--jt-r-chip);background:var(--jt-surface);color:var(--jt-ink);text-decoration:none;
  font:500 15px/1.3 var(--jt-serif)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-jump small{font:400 11.5px/1 var(--jt-num);color:var(--jt-faint)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-jump:hover{border-color:var(--jt-fam);background:var(--jt-fam-bg)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-jump:focus-visible,html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-node:focus-visible,html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-study:focus-visible{outline:none;box-shadow:var(--jt-focus)}

/* ---------- family card ---------- */
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-grid{display:block;columns:1;column-gap:14px}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-card{break-inside:avoid;margin:0 0 14px;padding:18px 18px 14px;scroll-margin-top:72px;
  background:rgba(250,247,240,.95);border:var(--jt-hair) solid var(--jt-panel-line);border-radius:var(--jt-r-panel);box-shadow:none}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-card[hidden]{display:none}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-head{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:2px 12px;margin:0 0 8px}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-kicker{grid-column:1/-1;margin:0;font:400 12.5px/1.4 var(--jt-sans);letter-spacing:.04em;color:var(--jt-muted)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-head h2{margin:0;font:500 17px/1.3 var(--jt-display);letter-spacing:.04em;color:var(--jt-ink-2)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-head h2 span{margin-right:4px;font:600 24px/1.2 var(--jt-serif);letter-spacing:0;color:var(--jt-ink)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-study{display:inline-flex;align-items:center;min-height:44px;padding:0 2px;color:var(--jt-brand);font-size:14px;text-decoration:none;white-space:nowrap}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-study::after{content:"→";margin-left:5px}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-study:hover{text-decoration:underline;text-underline-offset:3px}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-lede{margin:0 0 12px;font-size:14px;line-height:1.75;color:var(--jt-ink-2)}

/* ---------- tree ---------- */
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-tree{margin:0 0 4px;padding:6px 10px 6px 8px;background:rgba(244,239,228,.55);border:var(--jt-hair) solid var(--jt-line);border-radius:var(--jt-r-panel)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-t{margin:0;padding:0;list-style:none}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-t .fm-t{margin:0 0 0 12px;padding:0 0 0 16px}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-li{position:relative;margin:0;padding:0}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-t .fm-t > .fm-li::before{content:"";position:absolute;left:-16px;top:0;bottom:0;border-left:1.5px solid var(--jt-fam-line)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-t .fm-t > .fm-li:last-child::before{bottom:auto;height:25px}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-t .fm-t > .fm-li::after{content:"";position:absolute;left:-16px;top:25px;width:12px;border-top:1.5px solid var(--jt-fam-line)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-li[data-lv="root"]::before{border-left-style:dashed}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-li[data-lv="root"]::after{border-top-style:dashed}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-li[data-lv="mem"]::before{border-left-style:dotted;border-left-color:var(--jt-line-strong)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-li[data-lv="mem"]::after{border-top-style:dotted;border-top-color:var(--jt-line-strong)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-row{display:flex;align-items:center;gap:8px;min-height:50px;padding:2px 0}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-chip{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;min-width:44px;height:24px;box-sizing:border-box;padding:0 6px;
  border:var(--jt-hair) solid var(--jt-fam-line);border-radius:var(--jt-r-chip);background:var(--jt-fam-bg);color:var(--jt-fam);
  font:600 12.5px/1 var(--jt-serif);letter-spacing:.01em;white-space:nowrap}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-chip.root{background:transparent;border-style:dashed;font:500 12px/1 var(--jt-sans);letter-spacing:.08em}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-chip.mem{background:transparent;border-style:dotted;border-color:var(--jt-line-strong);color:var(--jt-muted);font:500 12px/1 var(--jt-sans);letter-spacing:.08em}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-chip.core{background:var(--jt-fam);border-color:var(--jt-fam);color:#FBF8FF;font:500 12px/1 var(--jt-sans);letter-spacing:.08em}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-node{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;justify-content:center;gap:1px;min-height:44px;padding:3px 8px;margin-left:-4px;
  border-radius:var(--jt-r-control);color:var(--jt-ink);text-decoration:none}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell a.fm-node:hover{background:var(--jt-brand-soft)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-w{font:600 18px/1.25 var(--jt-serif);letter-spacing:0;overflow-wrap:anywhere}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-node.is-core .fm-w{font-size:22px}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-meta{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px;font-size:13px;line-height:1.45;color:var(--jt-ink-2)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-pos{font:italic 400 13px/1.45 var(--jt-serif);color:var(--jt-muted)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-unit{padding:1px 5px;border:var(--jt-hair) solid var(--jt-line-strong);border-radius:2px;font:500 11px/1.3 var(--jt-num);color:var(--jt-muted)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-also{font-size:12px;color:var(--jt-faint)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-node.no-card .fm-w{color:var(--jt-ink-2)}

/* ---------- cross-unit comparisons, single words ---------- */
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell :is(.fm-cross,.fm-singles){margin:10px 0 0;border:var(--jt-hair) solid var(--jt-line);border-radius:var(--jt-r-control);background:none}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell :is(.fm-cross,.fm-singles) > summary{display:flex;align-items:center;gap:8px;min-height:44px;padding:0 12px;cursor:pointer;list-style:none;
  font:500 14px/1.4 var(--jt-sans);color:var(--jt-ink-2)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell :is(.fm-cross,.fm-singles) > summary::-webkit-details-marker{display:none}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell :is(.fm-cross,.fm-singles) > summary::before{content:"";width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:rotate(-45deg);transition:transform .2s}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell :is(.fm-cross,.fm-singles)[open] > summary::before{transform:rotate(45deg)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell :is(.fm-cross,.fm-singles) > summary small{font:400 12px/1.4 var(--jt-sans);color:var(--jt-faint)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-cross > p{margin:0 12px 8px;font-size:13px;line-height:1.7;color:var(--jt-muted)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-cross nav{display:grid;gap:6px;padding:0 10px 10px}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-cross nav a{display:grid;gap:2px;padding:9px 11px;border:var(--jt-hair) solid var(--jt-line);border-radius:var(--jt-r-control);background:var(--jt-surface);
  color:var(--jt-ink);text-decoration:none}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-cross nav a:hover{border-color:var(--jt-brand);background:var(--jt-brand-soft)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-cross nav strong{font:600 15px/1.35 var(--jt-serif)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-cross nav span{font-size:13px;line-height:1.65;color:var(--jt-ink-2)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-singles{margin:14px 0 0;background:rgba(250,247,240,.7)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-single-list{display:flex;flex-wrap:wrap;gap:6px;padding:0 12px 12px}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-single-list a{display:inline-flex;align-items:center;min-height:36px;box-sizing:border-box;padding:6px 10px;border:var(--jt-hair) solid var(--jt-line);
  border-radius:var(--jt-r-chip);background:var(--jt-surface);color:var(--jt-ink);text-decoration:none;font:500 15px/1.3 var(--jt-serif)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-single-list a:hover{border-color:var(--jt-brand)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .map-related-index{margin-top:14px}

@media (min-width:1000px){
  html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-grid{columns:2}
}
@media (max-width:720px){
  html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-card{padding:16px 14px 12px}
  html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-tree{padding:4px 6px 4px 4px}
  html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-t .fm-t{margin-left:10px;padding-left:14px}
  html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-t .fm-t > .fm-li::before,html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-t .fm-t > .fm-li::after{left:-14px}
  html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-t .fm-t > .fm-li::after{width:10px}
  html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-chip{min-width:40px}
  html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-legend{padding:10px 12px}
}

/* source word above the core (manage -> management), the core when it is derived, single-word cross links */
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-chip.src{background:transparent;border-color:var(--jt-line-strong);color:var(--jt-muted);font:500 12px/1 var(--jt-sans);letter-spacing:.08em}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-chip.is-core{background:var(--jt-fam);border-color:var(--jt-fam);color:#FBF8FF}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-core-tag{padding:1px 5px;border-radius:2px;background:var(--jt-fam-bg);color:var(--jt-fam);font:500 11px/1.3 var(--jt-sans);letter-spacing:.06em}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-single-note{margin:0 12px 6px;font-size:13px;color:var(--jt-muted)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-single-cross{display:grid;gap:6px;padding:0 10px 12px}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-single-cross a{display:grid;gap:2px;padding:9px 11px;border:var(--jt-hair) solid var(--jt-line);border-radius:var(--jt-r-control);background:var(--jt-surface);color:var(--jt-ink);text-decoration:none}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-single-cross strong{font:600 15px/1.35 var(--jt-serif)}
html[data-jt]:root body[data-jt-area="map"][data-jt-page] main.fm-shell .fm-single-cross span{font-size:13px;line-height:1.65;color:var(--jt-ink-2)}
