/* BASE*/
#chart {	height: 650px;	position: relative;	overflow: hidden;  margin-bottom: 20px;}
#chart p {	pointer-events: none;}
#chart div {	position: absolute;}
#chart .children div.parent,#chart .grandparent div {	cursor: pointer;}
#chart #tooltip {	position: absolute;	width: auto;	max-width: 200px;	margin-left: -20px;	height: auto;	padding: 3px 10px;	background-color: #fbfbfb;	border-radius: 5px;	box-shadow: 4px 4px 10px rgba(0, 0, 0, 0.4);	pointer-events: none;	z-index: 9999;	font-size: 12px;  line-height: 120%;}
#chart #tooltip.hiddenTooltip {	display: none;}
#chart #tooltip.leftTooltip {	margin-left: -120px;}
#chart #tooltip.topTooltip {	margin-top: -55px;}
#chart #tooltip.topTooltip.doubleLine {	margin-top: -75px;}

/* PERSONALIZADO*/
#chart .grandparent div {  background: white;}
#chart .grandparent p,#chart-title p {  font-family: 'MarcinAntB', sans-serif;  font-weight: 700;  font-style: normal;  color: black;  font-size: 15px;  line-height: 150%;  text-transform: uppercase;  margin: 10px 0px 0px;}
#chart .grandparent nav {  margin-top: 15px;  margin-bottom: 15px;  background: white;}
#chart .grandparent nav a {  display: inline-block;  vertical-align: middle;  background-repeat: no-repeat;  background-position: center;  width: 35px;  height: 40px;  text-align: left;  font-size: 0;  color: white;  margin: 0 10px;  padding-bottom: 3px;  border-bottom: 5px solid transparent;  transition: border .5s;}
#chart .grandparent nav a:before {  content: '';  display: inline-block;  vertical-align: middle;  background: #9e9e9e;  width: 2px;  height: 20px;  float: left;  margin-left: -10px;  margin-top: 7px;}
#chart .grandparent nav a:nth-child(2):before {  content: none;}
#chart .grandparent nav a.goBack:before {  float: right;  margin-left: 0;  margin-right: -10px;}


#chart .grandparent nav a.gasto { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/grises/proteccion-social.svg'); }
#chart .grandparent nav a.transferencias { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/grises/transferencias.svg'); }
#chart .grandparent nav a.deuda { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/grises/asuntos-economicos.svg'); }
#chart .grandparent nav a.servicios { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/grises/servicios-publicos.svg'); }
#chart .grandparent nav a.sanidad { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/grises/salud.svg'); }
#chart .grandparent nav a.educacion { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/grises/educacion.svg'); }
#chart .grandparent nav a.orden { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/grises/orden-publico.svg'); }
#chart .grandparent nav a.defensa { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/grises/defensa.svg'); }
#chart .grandparent nav a.agricultura { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/grises/proteccion.svg'); }
#chart .grandparent nav a.otros { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/grises/bombilla.svg'); }
#chart .grandparent nav a.goBack { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/grises/volver.svg'); float: left; }

#chart .children {font-family: 'MarcinAntB', sans-serif;font-weight: 500;font-style: normal; color: white;}
#chart .children .parent {padding-left: 25%;padding-top: 14px; overflow: hidden;}

#chart .children.gasto .parent { padding-left: 5.93em; padding-top: 1.31em; }
#chart .children.transferencias .parent  {padding-left: 4.6em;padding-top: 1em;}
#chart .children.deuda .parent  {padding-left: 4.6em;padding-top: 1em;}
#chart .children.servicios .parent{ padding-left: 3.675em;padding-top: 1em; }
#chart .children.otros .parent { padding-left:3.125em; }
#chart .children.orden .parent { padding-left: 3.25em; padding-top: .93em; }
#chart .children.sanidad .parent { padding-left: 3.375em; }
#chart .children.defensa .parent { padding-left:3.125em; }
#chart .children.agricultura .parent { padding-left: 2.31em; padding-right: .31em; }
#chart .children.educacion .parent {padding-left: 2.68em;padding-top: 10.81em;}


#chart .children .parent p {  line-height: 110%;}
#chart .children .parent:before {  content: '';  background-repeat: no-repeat;  background-position: center;  background-size: contain;  display: block;  width: 20%;  height: 20%;  position: absolute;  left: 15px;  top: 10px;}

#chart .children.gasto .parent:before { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/proteccion-social.svg'); width: 62px; height: 67px; }
#chart .children.transferencias .parent:before { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/transferencias.svg'); width: 62px; height: 67px; }
#chart .children.deuda .parent:before { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/asuntos-economicos.svg'); width: 54px; height: 48px; }
#chart .children.servicios .parent:before { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/servicios-publicos.svg'); width: 38px; height: 36px; }
#chart .children.otros .parent:before { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/bombilla.svg'); width: 40px; height: 30px; left: 5px; }
#chart .children.orden .parent:before { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/orden-publico.svg'); width: 37px; height: 32px; left: 9px; }
#chart .children.sanidad .parent:before { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/salud.svg'); width: 40px; height: 33px; left: 7px }
#chart .children.defensa .parent:before { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/defensa.svg'); width: 35px; height: 17px; left: 9px; }
#chart .children.agricultura .parent:before { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/medio-ambiente.svg'); width: 23px; height: 21px; left: 9px; }
#chart .children.educacion .parent:before {background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/educacion.svg');width: 18px;height: 25px;top: 13px;}

#chart .depth > div:not(.children) .parent {  font-family: 'MarcinAntB', sans-serif;  font-weight: 500;  font-style: normal;  color: white;  line-height: 130%;}
#chart-notes {  margin-bottom: 20px;}
#chart-notes li {  list-style: none;  font-size: 12px;  line-height: 140%;  margin-bottom: 5px;}
#chart-notes li span {  display: inline-block;}


/* TAMAÑOS FUENTES PORTADA*/
#chart .children.gasto .parent p { font-size:3.125em;}
#chart .children.transferencias .parent p {font-size: 1.4em;}
#chart .children.deuda .parent p {font-size: 1.3em;}
#chart .children.servicios .parent p { font-size: 1.2em; }
#chart .children.otros .parent p { font-size: 1.1em; }
#chart .children.orden .parent p {font-size: 1em;}
#chart .children.sanidad .parent p { font-size: .92em; line-height: 130%; }
#chart .children.defensa .parent p { font-size: .875em; line-height: 130%; }
#chart .children.agricultura .parent p {font-size: 0.71em;line-height: 130%;}
#chart .children.educacion .parent p { font-size: .625em; line-height: 130%; font-weight: normal;}



/*  TAMAÑOS FUENTES INTERIORES*/


#chart .depth > div:nth-child(9):not(.children) .parent,
#chart .depth.gasto > div:nth-child(10):not(.children) .parent,
#chart .depth.sanidad > div:nth-child(2):not(.children) .parent,
#chart .depth.servicios > div:nth-child(3):not(.children) .parent,
#chart .depth.educacion > div:nth-child(2):not(.children) .parent,
#chart .depth.transferencias > div:nth-child(4):not(.children) .parent,
#chart .depth.orden > div:nth-child(2):not(.children) .parent,
#chart .depth.defensa > div:nth-child(5):not(.children) .parent,
#chart .depth.agricultura > div:nth-child(3):not(.children) .parent,
#chart .depth.deuda > div:nth-child(5):not(.children) .parent,
#chart .depth.otros > div:nth-child(8):not(.children) .parent { font-size:3.125em; } 

#chart .depth > div:nth-child(8):not(.children) .parent,
#chart .depth.gasto > div:nth-child(9):not(.children) .parent,
#chart .depth.educacion > div:nth-child(1):not(.children) .parent,
#chart .depth.transferencias > div:nth-child(3):not(.children) .parent,
#chart .depth.orden > div:nth-child(1):not(.children) .parent,
#chart .depth.agricultura > div:nth-child(2):not(.children) .parent,
#chart .depth.sanidad > div:nth-child(1):not(.children) .parent,
#chart .depth.otros > div:nth-child(7):not(.children) .parent { font-size: 2.25em; } 

#chart .depth > div:nth-child(7):not(.children) .parent,
#chart .depth.gasto > div:nth-child(8):not(.children) .parent,
#chart .depth.defensa > div:nth-child(4):not(.children) .parent,
#chart .depth.agricultura > div:nth-child(1):not(.children) .parent,
#chart .depth.otros > div:nth-child(6):not(.children) .parent { font-size: 1.875em; } 

#chart .depth > div:nth-child(6):not(.children) .parent,
#chart .depth.gasto > div:nth-child(7):not(.children) .parent,
#chart .depth.defensa > div:nth-child(3):not(.children) .parent,
#chart .depth.transferencias > div:nth-child(2):not(.children) .parent,
#chart .depth.otros > div:nth-child(5):not(.children) .parent { font-size: 1.5em; } 

#chart .depth > div:nth-child(5):not(.children) .parent,
#chart .depth.gasto > div:nth-child(6):not(.children) .parent { font-size: 1.375em; } 

#chart .depth > div:nth-child(4):not(.children) .parent,
#chart .depth.defensa > div:nth-child(2):not(.children) .parent,
#chart .depth.otros > div:nth-child(4):not(.children) .parent{font-size: 1.125em; } 

#chart .depth > div:nth-child(3):not(.children) .parent,
#chart .depth.otros > div:nth-child(3):not(.children) .parent,
#chart .depth.defensa > div:nth-child(1):not(.children) .parent,

#chart .depth.servicios > div:nth-child(2):not(.children) .parent  { font-size: 1em; } 

#chart .depth > div:nth-child(2):not(.children) .parent{ font-size: .875em; } 

#chart .depth > div:nth-child(1):not(.children) .parent,
#chart .depth.deuda > div:nth-child(4):not(.children) .parent,
#chart .depth.servicios > div:nth-child(1):not(.children) .parent{ font-size: .81em; } 


#chart .depth.deuda > div:nth-child(3):not(.children) .parent,
#chart .depth.otros > div:nth-child(2):not(.children) .parent { font-size: .75em; line-height: 150%; }

#chart .depth.gasto > div:nth-child(5):not(.children) .parent,
#chart .depth.transferencias > div:nth-child(1):not(.children) .parent,
#chart .depth.gasto > div:nth-child(4):not(.children) .parent,
#chart .depth.gasto > div:nth-child(3):not(.children) .parent,
#chart .depth.gasto > div:nth-child(2):not(.children) .parent,
#chart .depth.gasto > div:nth-child(1):not(.children) .parent,
#chart .depth.deuda > div:nth-child(2):not(.children) .parent,
#chart .depth.deuda > div:nth-child(1):not(.children) .parent,
#chart .depth.otros > div:nth-child(1):not(.children) .parent { font-size: .565em; line-height: 150%; }


/*
  PADDINGS BLOQUES INTERIORES
*/

#chart .depth > div:not(.children) .parent{padding: .3em .5em;}

/*
  COLORES
*/

#chart-notes.estructura li .color1 { color: #8dc0ee; }
#chart-notes.estructura li .color2 { color: #be6ed5; }
#chart-notes.estructura li .color3 { color: #8acdac; }
#chart-notes.estructura li .color4 { color: #d7c354; }
#chart-notes.estructura li .color5 { color: #78bc75; }
#chart-notes.estructura li .color6 { color: #0085ff; }
#chart-notes.estructura li .color7 { color: #8acdac;}
#chart-notes.estructura li .color8 { color: #bcbf00; }
#chart-notes.estructura li .color9 { color: #33a319; }
#chart-notes.estructura li .color10 { color: #78bc75; }

#chart-notes.gasto li .color10 { color: #b0d4f4; }
#chart-notes.gasto li .color9 { color: #8dc0ee; }
#chart-notes.gasto li .color8 { color: #5d9cd4; }
#chart-notes.gasto li .color7 { color: #4789c3; }
#chart-notes.gasto li .color6 { color: #3e79ad; }
#chart-notes.gasto li .color5 { color: #3870a1; }
#chart-notes.gasto li .color4 { color: #346a98; }
#chart-notes.gasto li .color3 { color: #2c5d86; }
#chart-notes.gasto li .color2 { color: #28557a; }
#chart-notes.gasto li .color1 { color: #234b6c; }

#chart-notes.transferencias li .color4 { color: #f6936a; }
#chart-notes.transferencias li .color3 { color: #d9835f; }
#chart-notes.transferencias li .color2 { color: #c07657; }
#chart-notes.transferencias li .color1 { color: #b06b4f; }

#chart-notes.servicios li .color3 { color: #be6ed5; }
#chart-notes.servicios li .color2 { color: #b25eca; }
#chart-notes.servicios li .color1 { color: #a950c3; }

#chart-notes.servicios li .color10 { color: #be6ed5; }
#chart-notes.servicios li .color9 { color: #b25eca; }
#chart-notes.servicios li .color8 { color: #a950c3; }
#chart-notes.servicios li .color7 { color: #9a45b3; }
#chart-notes.servicios li .color6 { color: #923faa; }
#chart-notes.servicios li .color5 { color: #85349c; }
#chart-notes.servicios li .color4 { color: #792c8f; }
#chart-notes.servicios li .color3 { color: #6f2484; }
#chart-notes.servicios li .color2 { color: #b25eca; }
#chart-notes.servicios li .color1 { color: #641f77; }

#chart-notes.sanidad li .color10 { color: #8acdac; }
#chart-notes.sanidad li .color9 { color: #77b898; }
#chart-notes.sanidad li .color8 { color: #71b292; }
#chart-notes.sanidad li .color7 { color: #64a284; }
#chart-notes.sanidad li .color6 { color: #5b987a; }
#chart-notes.sanidad li .color5 { color: #528d70; }
#chart-notes.sanidad li .color4 { color: #792c8f; }
#chart-notes.sanidad li .color3 { color: #498065; }
#chart-notes.sanidad li .color2 { color: #40775c; }
#chart-notes.sanidad li .color1 { color: #356c50; }

#chart-notes.deuda li .color9 { color: #d7c354; }
#chart-notes.deuda li .color8 { color: #b9a744; }
#chart-notes.deuda li .color7 { color: #ab9a3f; }
#chart-notes.deuda li .color6 { color: #9d8d37; }
#chart-notes.deuda li .color5 { color: #928332; }
#chart-notes.deuda li .color4 { color: #86782b; }
#chart-notes.deuda li .color3 { color: #786b24; }
#chart-notes.deuda li .color2 { color: #6a5e1e; }
#chart-notes.deuda li .color1 { color: #5b5119; }

#chart-notes.educacion li .color9 { color: #78bc75; }
#chart-notes.educacion li .color8 { color: #62a25f; }
#chart-notes.educacion li .color7 { color: #589555; }
#chart-notes.educacion li .color6 { color: #4e884b; }
#chart-notes.educacion li .color5 { color: #457c42; }
#chart-notes.educacion li .color4 { color: #3e713b; }
#chart-notes.educacion li .color3 { color: #376834; }
#chart-notes.educacion li .color2 { color: #2e5c2c; }
#chart-notes.educacion li .color1 { color: #264e24; }

#chart-notes.orden li .color9 { color: #0085ff; }
#chart-notes.orden li .color8 { color: #107bde; }
#chart-notes.orden li .color7 { color: #1272cc; }
#chart-notes.orden li .color6 { color: #0e6bc2; }
#chart-notes.orden li .color5 { color: #1062ae; }
#chart-notes.orden li .color4 { color: #0e589d; }
#chart-notes.orden li .color3 { color: #0d4c87; }
#chart-notes.orden li .color2 { color: #0a447a; }
#chart-notes.orden li .color1 { color: #0a3d6c; }

#chart-notes.defensa li .color9 { color: #a5a805; }
#chart-notes.defensa li .color8 { color: #979a07; }
#chart-notes.defensa li .color7 { color: #8a8d0a; }
#chart-notes.defensa li .color6 { color: #7f820b; }
#chart-notes.defensa li .color5 { color: #72750e; }
#chart-notes.defensa li .color4 { color: #676a0f; }
#chart-notes.defensa li .color3 { color: #5a5d10; }
#chart-notes.defensa li .color2 { color: #4f520e; }
#chart-notes.defensa li .color1 { color: #a5a805; }

#chart-notes.agricultura li .color9 { color: #33a319; }
#chart-notes.agricultura li .color8 { color: #32991a; }
#chart-notes.agricultura li .color7 { color: #308e1a; }
#chart-notes.agricultura li .color6 { color: #2c7f18; }
#chart-notes.agricultura li .color5 { color: #297317; }
#chart-notes.agricultura li .color4 { color: #276b16; }
#chart-notes.agricultura li .color3 { color: #235c14; }
#chart-notes.agricultura li .color2 { color: #215313; }
#chart-notes.agricultura li .color1 { color: #1c4710; }

#chart-notes.otros li .color9 { color: #ca5283; }
#chart-notes.otros li .color8 { color: #b54b76; }
#chart-notes.otros li .color7 { color: #a9466e; }
#chart-notes.otros li .color6 { color: #9f4368; }
#chart-notes.otros li .color5 { color: #8f3f5f; }
#chart-notes.otros li .color4 { color: #823b57; }
#chart-notes.otros li .color3 { color: #793751; }
#chart-notes.otros li .color2 { color: #6b3148; }
#chart-notes.otros li .color1 { color: #5e2f42; }


#chart-title p span.gasto { color: #8dc0ee; }
#chart .grandparent nav a.gasto.active { border-color: #8dc0ee; }
#chart .children.gasto .child, #chart .children:hover.gasto .child:nth-child(10), #chart .depth.gasto > div:nth-child(10) .parent { background: #b0d4f4; }
#chart .children:hover.gasto .child:nth-child(10), #chart .depth.gasto > div:nth-child(10) .child { background: #b0d4f4; }
#chart .children:hover.gasto .child:nth-child(9), #chart .depth.gasto > div:nth-child(9) .child { background: #8dc0ee; }
#chart .children:hover.gasto .child:nth-child(8), #chart .depth.gasto > div:nth-child(8) .child { background: #5d9cd4; }
#chart .children:hover.gasto .child:nth-child(7), #chart .depth.gasto > div:nth-child(7) .child { background: #4789c3; }
#chart .children:hover.gasto .child:nth-child(6), #chart .depth.gasto > div:nth-child(6) .child { background: #3e79ad; }
#chart .children:hover.gasto .child:nth-child(5), #chart .depth.gasto > div:nth-child(5) .child { background: #3870a1; }
#chart .children:hover.gasto .child:nth-child(4), #chart .depth.gasto > div:nth-child(4) .child { background: #346a98; }
#chart .children:hover.gasto .child:nth-child(3), #chart .depth.gasto > div:nth-child(3) .child { background: #2c5d86; }
#chart .children:hover.gasto .child:nth-child(2), #chart .depth.gasto > div:nth-child(2) .child { background: #28557a; }
#chart .children:hover.gasto .child:nth-child(1), #chart .depth.gasto > div:nth-child(1) .child { background: #234b6c; }


#chart .children.transferencias .child, #chart .children:hover.transferencias .child:nth-child(4), #chart .depth.transferencias > div:nth-child(4) .parent { background: #f6936a; }
#chart .children:hover.transferencias .child:nth-child(3), #chart .depth.transferencias > div:nth-child(3) .child { background: #d9835f; }
#chart .children:hover.transferencias .child:nth-child(2), #chart .depth.transferencias > div:nth-child(2) .child { background: #c07657; }
#chart .children:hover.transferencias .child:nth-child(1), #chart .depth.transferencias > div:nth-child(1) .child { background: #b06b4f; }



#chart-title p span.deuda { color: #d7c354; }
#chart .grandparent nav a.deuda.active { border-color: #d7c354; }
#chart .children.deuda .child, #chart .children:hover.deuda .child:nth-child(5), #chart .depth.deuda > div:nth-child(5) .parent { background: #d7c354; }
#chart .children:hover.deuda .child:nth-child(4), #chart .depth.deuda > div:nth-child(4) .child { background: #b9a744; }
#chart .children:hover.deuda .child:nth-child(3), #chart .depth.deuda > div:nth-child(3) .child { background: #ab9a3f; }
#chart .children:hover.deuda .child:nth-child(2), #chart .depth.deuda > div:nth-child(2) .child { background: #9d8d37; }
#chart .children:hover.deuda .child:nth-child(1), #chart .depth.deuda > div:nth-child(1) .child { background: #928332; }


#chart-title p span.servicios { color: #be6ed5; }
#chart .grandparent nav a.servicios.active { border-color: #be6ed5; }
#chart .children.servicios .child, #chart .children:hover.servicios .child:nth-child(3), #chart .depth.servicios > div:nth-child(3) .parent { background: #be6ed5; }
#chart .children:hover.servicios .child:nth-child(2), #chart .depth.servicios > div:nth-child(2) .child { background: #b25eca; }
#chart .children:hover.servicios .child:nth-child(1), #chart .depth.servicios > div:nth-child(1) .child { background: #a950c3; }





#chart-title p span.otros { color: #ca5283; }
#chart .grandparent nav a.otros.active { border-color: #ca5283; }
#chart .children.otros .child, #chart .children:hover.otros .child:nth-child(8), #chart .depth.otros > div:nth-child(8) .parent { background: #ca5283; }
#chart .children:hover.otros .child:nth-child(7), #chart .depth.otros > div:nth-child(7) .child { background: #b54b76; }
#chart .children:hover.otros .child:nth-child(6), #chart .depth.otros > div:nth-child(6) .child { background: #a9466e; }
#chart .children:hover.otros .child:nth-child(5), #chart .depth.otros > div:nth-child(5) .child { background: #9f4368; }
#chart .children:hover.otros .child:nth-child(4), #chart .depth.otros > div:nth-child(4) .child { background: #8f3f5f; }
#chart .children:hover.otros .child:nth-child(3), #chart .depth.otros > div:nth-child(3) .child { background: #823b57; }
#chart .children:hover.otros .child:nth-child(2), #chart .depth.otros > div:nth-child(2) .child { background: #793751; }
#chart .children:hover.otros .child:nth-child(1), #chart .depth.otros > div:nth-child(1) .child { background: #6b3148; }


#chart-title p span.transferencias { color: #f6936a; }
#chart .grandparent nav a.transferencias.active { border-color: #f6936a; }


#chart-title p span.orden { color: #0085ff; }
#chart .grandparent nav a.orden.active { border-color: #0085ff; }
#chart .children.orden .child, #chart .children:hover.orden .child:nth-child(2), #chart .depth.orden > div:nth-child(2) .parent { background: #0085ff; }
#chart .children:hover.orden .child:nth-child(1), #chart .depth.orden > div:nth-child(1) .child { background: #107bde; }

#chart-title p span.sanidad { color: #8acdac; }
#chart .grandparent nav a.sanidad.active { border-color: #8acdac; }
#chart .children.sanidad .child, #chart .children:hover.sanidad .child:nth-child(2), #chart .depth.sanidad > div:nth-child(2) .parent { background: #8acdac; }
#chart .children:hover.sanidad .child:nth-child(1), #chart .depth.sanidad > div:nth-child(1) .child { background: #77b898; }

#chart-title p span.defensa { color: #bcbf00; }
#chart .grandparent nav a.defensa.active { border-color: #bcbf00; }
#chart .children.defensa .child, #chart .children:hover.defensa .child:nth-child(5), #chart .depth.defensa > div:nth-child(5) .parent { background: #bcbf00; }
#chart .children:hover.defensa .child:nth-child(4), #chart .depth.defensa > div:nth-child(4) .child { background: #a5a805; }
#chart .children:hover.defensa .child:nth-child(3), #chart .depth.defensa > div:nth-child(3) .child { background: #979a07; }
#chart .children:hover.defensa .child:nth-child(2), #chart .depth.defensa > div:nth-child(2) .child { background: #8a8d0a; }
#chart .children:hover.defensa .child:nth-child(1), #chart .depth.defensa > div:nth-child(1) .child { background: #7f820b; }


#chart-title p span.agricultura { color: #33a319; }
#chart .grandparent nav a.agricultura.active { border-color: #33a319; }
#chart .children.agricultura .child, #chart .children:hover.agricultura .child:nth-child(3), #chart .depth.agricultura > div:nth-child(3) .parent { background: #33a319; }
#chart .children:hover.agricultura .child:nth-child(2), #chart .depth.agricultura > div:nth-child(2) .child { background: #32991a; }
#chart .children:hover.agricultura .child:nth-child(1), #chart .depth.agricultura > div:nth-child(1) .child { background: #308e1a; }


#chart-title p span.educacion { color: #78bc75; }
#chart .grandparent nav a.educacion.active { border-color: #78bc75; }
#chart .children.educacion .child, #chart .children:hover.educacion .child:nth-child(2), #chart .depth.educacion > div:nth-child(2) .parent { background: #78bc75; }
#chart .children:hover.educacion .child:nth-child(1), #chart .depth.educacion > div:nth-child(1) .child { background: #62a25f; }



@media(max-width: 999px){
  #chart{width: 700px; margin: 0 auto; }

  #chart .children.gasto .parent:before { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/proteccion-social.svg'); width: 62px; height: 67px; }
  #chart .children.deuda .parent:before {background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/asuntos-economicos.svg');width: 48px;height: 48px;}
  #chart .children.servicios .parent:before {background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/servicios-publicos.svg');width: 31px;height: 36px;}
  #chart .children.otros .parent:before {background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/vivienda.svg');width: 36.8px;height: 25px;left: 5px;}
  #chart .children.orden .parent:before {background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/orden-publico.svg');width: 29px;height: 32px;left: 7px;}
  #chart .children.sanidad .parent:before {background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/salud.svg');width: 24px;height: 33px;left: 7px;top: 7px;}
  #chart .children.defensa .parent:before {background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/defensa.svg');width: 21px;height: 22px;left: 9px;}
  #chart .children.agricultura .parent:before { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/medio-ambiente.svg'); width: 23px; height: 21px; left: 9px; }
  #chart .children.educacion .parent:before { background-image: url('/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/educacion.svg'); width: 18px; height: 25px; top: 6px; }

  #chart .children.gasto .parent { padding-left: 5.93em; padding-top: 1.31em; }
  #chart .children.transferencias .parent {  padding-left: .5em;  padding-top: 5em;}
  #chart .children.deuda .parent  {padding-left: 4em;padding-top: 1em;}
  #chart .children.servicios .parent{padding-left: 3.175em;padding-top: 1em;}
  #chart .children.otros .parent {padding-left: 2.825em;}
  #chart .children.orden .parent {padding-left: 2.45em;padding-top: .93em;}
  #chart .children.sanidad .parent {padding-left: 1.875em;}
  #chart .children.defensa .parent {padding-left: 2.025em;}
  #chart .children.agricultura .parent {padding-left: 2.11em;padding-right: .31em;}
  #chart .children.educacion .parent {padding-left: 3.18em;padding-top: .81em;}


  /* TAMAÑOS FUENTES PORTADA*/
  #chart .children.gasto .parent p { font-size:3.125em;}
  #chart .children.deuda .parent p {font-size: 1.85em;}
  #chart .children.servicios .parent p {font-size: 1.175em;}
  #chart .children.otros .parent p {font-size: 1.1em;}
  #chart .children.orden .parent p {font-size: 0.85em;}
  #chart .children.sanidad .parent p {font-size: 0.625em;line-height: 130%;}
  #chart .children.defensa .parent p {font-size: 0.575em;line-height: 130%;}
  #chart .children.agricultura .parent p {font-size: 0.61em;line-height: 130%;}
  #chart .children.educacion .parent p { font-size: .625em; line-height: 130%; font-weight: normal;}

  #chart .depth > div:nth-child(9):not(.children) .parent,
  #chart .depth.gasto > div:nth-child(10):not(.children) .parent,
  #chart .depth.transferencias > div:nth-child(4):not(.children) .parent,
  #chart .depth.sanidad > div:nth-child(2):not(.children) .parent,
  #chart .depth.servicios > div:nth-child(3):not(.children) .parent,
  #chart .depth.educacion > div:nth-child(2):not(.children) .parent,
  #chart .depth.orden > div:nth-child(2):not(.children) .parent,
  #chart .depth.defensa > div:nth-child(5):not(.children) .parent,
  #chart .depth.agricultura > div:nth-child(3):not(.children) .parent,
  #chart .depth.deuda > div:nth-child(5):not(.children) .parent,
  #chart .depth.otros > div:nth-child(8):not(.children) .parent {  font-size: 2.525em; } 

  #chart .depth > div:nth-child(8):not(.children) .parent,
  #chart .depth.transferencias > div:nth-child(3):not(.children) .parent,
  #chart .depth.gasto > div:nth-child(9):not(.children) .parent,
  #chart .depth.educacion > div:nth-child(1):not(.children) .parent,
  #chart .depth.orden > div:nth-child(1):not(.children) .parent,
  #chart .depth.agricultura > div:nth-child(2):not(.children) .parent,
  #chart .depth.sanidad > div:nth-child(1):not(.children) .parent,
  #chart .depth.otros > div:nth-child(7):not(.children) .parent { font-size: 2em; } 

  #chart .depth > div:nth-child(7):not(.children) .parent,
  #chart .depth.gasto > div:nth-child(8):not(.children) .parent,
  #chart .depth.defensa > div:nth-child(4):not(.children) .parent,
  #chart .depth.agricultura > div:nth-child(1):not(.children) .parent,
  #chart .depth.otros > div:nth-child(6):not(.children) .parent {font-size: 1.675em;} 

  #chart .depth > div:nth-child(6):not(.children) .parent,
  #chart .depth.gasto > div:nth-child(7):not(.children) .parent,
  #chart .depth.defensa > div:nth-child(3):not(.children) .parent,
  #chart .depth.transferencias > div:nth-child(2):not(.children) .parent,
  #chart .depth.otros > div:nth-child(5):not(.children) .parent {font-size: 1.3em;} 

  #chart .depth > div:nth-child(5):not(.children) .parent,
  #chart .depth.gasto > div:nth-child(6):not(.children) .parent {font-size: 1.1em;} 

  #chart .depth > div:nth-child(4):not(.children) .parent,
  #chart .depth.defensa > div:nth-child(2):not(.children) .parent,
  #chart .depth.otros > div:nth-child(4):not(.children) .parent{font-size: 1.125em; } 

  #chart .depth > div:nth-child(3):not(.children) .parent,
  #chart .depth.otros > div:nth-child(3):not(.children) .parent,
  #chart .depth.defensa > div:nth-child(1):not(.children) .parent,
  #chart .depth.servicios > div:nth-child(2):not(.children) .parent  { font-size: 1em; } 

  #chart .depth > div:nth-child(2):not(.children) .parent{ font-size: .875em; } 

  #chart .depth > div:nth-child(1):not(.children) .parent,
  #chart .depth.deuda > div:nth-child(4):not(.children) .parent,
  #chart .depth.transferencias > div:nth-child(1):not(.children) .parent,
  #chart .depth.servicios > div:nth-child(1):not(.children) .parent{ font-size: .81em; } 


  #chart .depth.deuda > div:nth-child(3):not(.children) .parent,
  #chart .depth.otros > div:nth-child(2):not(.children) .parent { font-size: .75em; line-height: 150%; }

  #chart .depth.gasto > div:nth-child(5):not(.children) .parent,
  #chart .depth.gasto > div:nth-child(4):not(.children) .parent,
  #chart .depth.gasto > div:nth-child(3):not(.children) .parent,
  #chart .depth.gasto > div:nth-child(2):not(.children) .parent,
  #chart .depth.gasto > div:nth-child(1):not(.children) .parent,
  #chart .depth.deuda > div:nth-child(2):not(.children) .parent,
  #chart .depth.deuda > div:nth-child(1):not(.children) .parent,
  #chart .depth.otros > div:nth-child(1):not(.children) .parent {font-size: 0.465em;line-height: 150%;}


  #chart .children.transferencias .parent p { font-size: 0.9em;}

}



@media screen and (max-width:767px){
  #chart { height: 1360px; width: 300px;}
  #chart .depth{margin-top: 140px!important;}

  #chart .depth > div:nth-child(9):not(.children) .parent, #chart .depth.gasto > div:nth-child(10):not(.children) .parent, #chart .depth.sanidad > div:nth-child(2):not(.children) .parent, #chart .depth.servicios > div:nth-child(3):not(.children) .parent, #chart .depth.transferencias > div:nth-child(4):not(.children) .parent, #chart .depth.educacion > div:nth-child(2):not(.children) .parent, #chart .depth.orden > div:nth-child(2):not(.children) .parent, #chart .depth.defensa > div:nth-child(5):not(.children) .parent, #chart .depth.agricultura > div:nth-child(3):not(.children) .parent, #chart .depth.deuda > div:nth-child(5):not(.children) .parent, #chart .depth.otros > div:nth-child(8):not(.children) .parent { font-size: 2.025em;}
	#chart .children.orden .parent { padding-left: 2.45em;  padding-top: 0.43em;}  
	#chart .children.orden .parent:before {  background-image: url(/estaticos/2017/04/presupuestos-2017/img/iconos/blancos/orden-publico.svg); width: 29px; height: 32px;  left: 7px; top: 0px;}
	
	#chart .children.transferencias .parent {  padding-left: 4.7em;  padding-top: 1.6em;}
	#chart .children.transferencias .parent p {  font-size: 1.5em;}

}
